summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-03-21 06:39:49 +0000
committerNorbert Preining <preining@logic.at>2008-03-21 06:39:49 +0000
commite5e42ab9d2fe5584924e6db8d00d8d7d2443c657 (patch)
tree83ebb71b6d523e1a02fd02c63f6c5abd31b6a448 /Master
parent2647df2c7bf1d082cdcc0628cc8e5c11024f9eb1 (diff)
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
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/install-tl.pl7
-rwxr-xr-xMaster/tlpkg/installer/install-menu-text.pl28
2 files changed, 31 insertions, 4 deletions
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 {
<D> 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):