summaryrefslogtreecommitdiff
path: root/Master/tlpkg/installer/install-menu-text.pl
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/installer/install-menu-text.pl')
-rwxr-xr-xMaster/tlpkg/installer/install-menu-text.pl16
1 files changed, 2 insertions, 14 deletions
diff --git a/Master/tlpkg/installer/install-menu-text.pl b/Master/tlpkg/installer/install-menu-text.pl
index af81b7115db..88ed73355e7 100755
--- a/Master/tlpkg/installer/install-menu-text.pl
+++ b/Master/tlpkg/installer/install-menu-text.pl
@@ -451,14 +451,7 @@ 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 {
+ if (!TeXLive::TLUtils::texdir_check($vars{'TEXDIR'})) {
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.
@@ -824,12 +817,7 @@ sub main_menu {
TEXDIR (The main TeX directory):
EOF
;
- my $texdir = $vars{'TEXDIR'};
- my $texdirparent = dirname($texdir);
- my $texdirpparent = dirname($texdirparent);
- if ( (-w $texdirpparent) ||
- ( (-d $texdirparent) && (-w $texdirparent)) ||
- ( (-d $texdir) && (-w $texdir) ) ) {
+ if (TeXLive::TLUtils::texdir_check($vars{'TEXDIR'})) {
print " $vars{'TEXDIR'}\n";
} else {
print " !! default location: $vars{'TEXDIR'}\n";