From e5e42ab9d2fe5584924e6db8d00d8d7d2443c657 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 21 Mar 2008 06:39:49 +0000 Subject: do not change the default install location on unix, and give warnings git-svn-id: svn://tug.org/texlive/trunk@7052 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/installer/install-menu-text.pl | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'Master/tlpkg') diff --git a/Master/tlpkg/installer/install-menu-text.pl b/Master/tlpkg/installer/install-menu-text.pl index fc1c536edd2..af81b7115db 100755 --- a/Master/tlpkg/installer/install-menu-text.pl +++ b/Master/tlpkg/installer/install-menu-text.pl @@ -451,6 +451,19 @@ sub directories_menu { ); menu_head "Current directories setup:"; + my $texdir = $vars{'TEXDIR'}; + my $texdirparent = dirname($texdir); + my $texdirpparent = dirname($texdirparent); + if ( (-w $texdirpparent) || + ( (-d $texdirparent) && (-w $texdirparent)) || + ( (-d $texdir) && (-w $texdir) ) ) { + # do nothing + } else { + print "!! The default location as given below can't be written to. +!! Either change the destination directory using <1> or create it +!! outside this script. +"; + } print <<"EOF"; <1> TEXDIR: $vars{'TEXDIR'} support tree: $vars{'TEXDIR'}/texmf @@ -809,7 +822,20 @@ sub main_menu { directories: TEXDIR (The main TeX directory): - $vars{'TEXDIR'} +EOF +; + my $texdir = $vars{'TEXDIR'}; + my $texdirparent = dirname($texdir); + my $texdirpparent = dirname($texdirparent); + if ( (-w $texdirpparent) || + ( (-d $texdirparent) && (-w $texdirparent)) || + ( (-d $texdir) && (-w $texdir) ) ) { + print " $vars{'TEXDIR'}\n"; + } else { + print " !! default location: $vars{'TEXDIR'}\n"; + print " !! is not writable, please select a different one!\n"; + } + print <<"EOF"; TEXMFLOCAL (Directory for local styles etc): $vars{'TEXMFLOCAL'} TEXMFSYSVAR (Directory for local config): -- cgit v1.2.3