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/install-tl.pl | 7 ++++--- Master/tlpkg/installer/install-menu-text.pl | 28 +++++++++++++++++++++++++++- 2 files changed, 31 insertions(+), 4 deletions(-) (limited to 'Master') diff --git a/Master/install-tl.pl b/Master/install-tl.pl index 09c6bd89fe6..76ac273ad18 100755 --- a/Master/install-tl.pl +++ b/Master/install-tl.pl @@ -470,9 +470,10 @@ sub set_texlive_default_dirs { $tex_prefix ||= $prog . '/texlive' if TeXLive::TLWinGoo::dir_writable($prog); $tex_prefix||=getenv('USERPROFILE') . '/texlive'; } else { - $tex_prefix||='/usr/local/texlive' if (-w '/usr/local'); - $tex_prefix||='/usr/local/texlive' if ( (-d '/usr/local/texlive') && (-w '/usr/local/texlive') ); - $tex_prefix||=getenv('HOME') . '/texlive'; + $tex_prefix||='/usr/local/texlive'; + # $tex_prefix||='/usr/local/texlive' if (-w '/usr/local'); + # $tex_prefix||='/usr/local/texlive' if ( (-d '/usr/local/texlive') && (-w '/usr/local/texlive') ); + # $tex_prefix||=getenv('HOME') . '/texlive'; } $vars{'TEXDIR'}="$tex_prefix/$texlive_release"; 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