summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/texk/texlive/getnonfreefonts18
-rwxr-xr-xMaster/bin/alpha-linux/getnonfreefonts18
-rwxr-xr-xMaster/bin/hppa-hpux/getnonfreefonts18
-rwxr-xr-xMaster/bin/i386-darwin/getnonfreefonts18
-rwxr-xr-xMaster/bin/i386-freebsd/getnonfreefonts18
-rwxr-xr-xMaster/bin/i386-linux/getnonfreefonts18
-rwxr-xr-xMaster/bin/i386-openbsd/getnonfreefonts18
-rwxr-xr-xMaster/bin/i386-solaris/getnonfreefonts18
-rwxr-xr-xMaster/bin/mips-irix/getnonfreefonts59
-rwxr-xr-xMaster/bin/powerpc-aix/getnonfreefonts18
-rwxr-xr-xMaster/bin/powerpc-darwin/getnonfreefonts18
-rwxr-xr-xMaster/bin/sparc-linux/getnonfreefonts18
-rwxr-xr-xMaster/bin/sparc-solaris/getnonfreefonts18
-rw-r--r--Master/bin/win32/getnonfreefonts.bat18
-rwxr-xr-xMaster/bin/x86_64-linux/getnonfreefonts18
15 files changed, 188 insertions, 123 deletions
diff --git a/Build/source/texk/texlive/getnonfreefonts b/Build/source/texk/texlive/getnonfreefonts
index 969a251b52c..5965b4fc64a 100644
--- a/Build/source/texk/texlive/getnonfreefonts
+++ b/Build/source/texk/texlive/getnonfreefonts
@@ -107,7 +107,7 @@ sub expand_var {
}
while (<KPSEWHICH>) {
chop;
- return $_;
+ return "$_";
}
close KPSEWHICH;
}
@@ -172,11 +172,9 @@ if ($opt_debug) {
}
-if ($sys) {
- $INSTALLROOT=expand_var 'TEXMFLOCAL';
-} else {
- $INSTALLROOT=expand_var 'TEXMFHOME';
-}
+$INSTALLROOTNAME=($sys)? 'TEXMFLOCAL':'TEXMFHOME';
+
+$INSTALLROOT=expand_var "$INSTALLROOTNAME";
($sys)? debug_msg "sys=true":debug_msg "sys=false";
@@ -188,7 +186,13 @@ $INSTALLROOT=~s/\\/\//g if ($INSTALLROOT=~/^\\\\/); # \\abc\def
debug_msg "Internal variable INSTALLROOT converted to '$INSTALLROOT'";
sub check_installroot {
- die "! ERROR: The install directory '$INSTALLROOT' doesn't exist.\n"
+ die "! ERROR: The variable $INSTALLROOTNAME is not set.\n"
+ unless length ("$INSTALLROOT") > 0;
+
+ die "! ERROR: The install directory '$INSTALLROOT' doesn't " .
+ "exist.\n" .
+ " If this is the correct path, please create " .
+ "this directory manually.\n"
unless (-d "$INSTALLROOT");
die "! ERROR: The install directory '$INSTALLROOT' is not writable.\n"
diff --git a/Master/bin/alpha-linux/getnonfreefonts b/Master/bin/alpha-linux/getnonfreefonts
index 969a251b52c..5965b4fc64a 100755
--- a/Master/bin/alpha-linux/getnonfreefonts
+++ b/Master/bin/alpha-linux/getnonfreefonts
@@ -107,7 +107,7 @@ sub expand_var {
}
while (<KPSEWHICH>) {
chop;
- return $_;
+ return "$_";
}
close KPSEWHICH;
}
@@ -172,11 +172,9 @@ if ($opt_debug) {
}
-if ($sys) {
- $INSTALLROOT=expand_var 'TEXMFLOCAL';
-} else {
- $INSTALLROOT=expand_var 'TEXMFHOME';
-}
+$INSTALLROOTNAME=($sys)? 'TEXMFLOCAL':'TEXMFHOME';
+
+$INSTALLROOT=expand_var "$INSTALLROOTNAME";
($sys)? debug_msg "sys=true":debug_msg "sys=false";
@@ -188,7 +186,13 @@ $INSTALLROOT=~s/\\/\//g if ($INSTALLROOT=~/^\\\\/); # \\abc\def
debug_msg "Internal variable INSTALLROOT converted to '$INSTALLROOT'";
sub check_installroot {
- die "! ERROR: The install directory '$INSTALLROOT' doesn't exist.\n"
+ die "! ERROR: The variable $INSTALLROOTNAME is not set.\n"
+ unless length ("$INSTALLROOT") > 0;
+
+ die "! ERROR: The install directory '$INSTALLROOT' doesn't " .
+ "exist.\n" .
+ " If this is the correct path, please create " .
+ "this directory manually.\n"
unless (-d "$INSTALLROOT");
die "! ERROR: The install directory '$INSTALLROOT' is not writable.\n"
diff --git a/Master/bin/hppa-hpux/getnonfreefonts b/Master/bin/hppa-hpux/getnonfreefonts
index 969a251b52c..5965b4fc64a 100755
--- a/Master/bin/hppa-hpux/getnonfreefonts
+++ b/Master/bin/hppa-hpux/getnonfreefonts
@@ -107,7 +107,7 @@ sub expand_var {
}
while (<KPSEWHICH>) {
chop;
- return $_;
+ return "$_";
}
close KPSEWHICH;
}
@@ -172,11 +172,9 @@ if ($opt_debug) {
}
-if ($sys) {
- $INSTALLROOT=expand_var 'TEXMFLOCAL';
-} else {
- $INSTALLROOT=expand_var 'TEXMFHOME';
-}
+$INSTALLROOTNAME=($sys)? 'TEXMFLOCAL':'TEXMFHOME';
+
+$INSTALLROOT=expand_var "$INSTALLROOTNAME";
($sys)? debug_msg "sys=true":debug_msg "sys=false";
@@ -188,7 +186,13 @@ $INSTALLROOT=~s/\\/\//g if ($INSTALLROOT=~/^\\\\/); # \\abc\def
debug_msg "Internal variable INSTALLROOT converted to '$INSTALLROOT'";
sub check_installroot {
- die "! ERROR: The install directory '$INSTALLROOT' doesn't exist.\n"
+ die "! ERROR: The variable $INSTALLROOTNAME is not set.\n"
+ unless length ("$INSTALLROOT") > 0;
+
+ die "! ERROR: The install directory '$INSTALLROOT' doesn't " .
+ "exist.\n" .
+ " If this is the correct path, please create " .
+ "this directory manually.\n"
unless (-d "$INSTALLROOT");
die "! ERROR: The install directory '$INSTALLROOT' is not writable.\n"
diff --git a/Master/bin/i386-darwin/getnonfreefonts b/Master/bin/i386-darwin/getnonfreefonts
index 969a251b52c..5965b4fc64a 100755
--- a/Master/bin/i386-darwin/getnonfreefonts
+++ b/Master/bin/i386-darwin/getnonfreefonts
@@ -107,7 +107,7 @@ sub expand_var {
}
while (<KPSEWHICH>) {
chop;
- return $_;
+ return "$_";
}
close KPSEWHICH;
}
@@ -172,11 +172,9 @@ if ($opt_debug) {
}
-if ($sys) {
- $INSTALLROOT=expand_var 'TEXMFLOCAL';
-} else {
- $INSTALLROOT=expand_var 'TEXMFHOME';
-}
+$INSTALLROOTNAME=($sys)? 'TEXMFLOCAL':'TEXMFHOME';
+
+$INSTALLROOT=expand_var "$INSTALLROOTNAME";
($sys)? debug_msg "sys=true":debug_msg "sys=false";
@@ -188,7 +186,13 @@ $INSTALLROOT=~s/\\/\//g if ($INSTALLROOT=~/^\\\\/); # \\abc\def
debug_msg "Internal variable INSTALLROOT converted to '$INSTALLROOT'";
sub check_installroot {
- die "! ERROR: The install directory '$INSTALLROOT' doesn't exist.\n"
+ die "! ERROR: The variable $INSTALLROOTNAME is not set.\n"
+ unless length ("$INSTALLROOT") > 0;
+
+ die "! ERROR: The install directory '$INSTALLROOT' doesn't " .
+ "exist.\n" .
+ " If this is the correct path, please create " .
+ "this directory manually.\n"
unless (-d "$INSTALLROOT");
die "! ERROR: The install directory '$INSTALLROOT' is not writable.\n"
diff --git a/Master/bin/i386-freebsd/getnonfreefonts b/Master/bin/i386-freebsd/getnonfreefonts
index 969a251b52c..5965b4fc64a 100755
--- a/Master/bin/i386-freebsd/getnonfreefonts
+++ b/Master/bin/i386-freebsd/getnonfreefonts
@@ -107,7 +107,7 @@ sub expand_var {
}
while (<KPSEWHICH>) {
chop;
- return $_;
+ return "$_";
}
close KPSEWHICH;
}
@@ -172,11 +172,9 @@ if ($opt_debug) {
}
-if ($sys) {
- $INSTALLROOT=expand_var 'TEXMFLOCAL';
-} else {
- $INSTALLROOT=expand_var 'TEXMFHOME';
-}
+$INSTALLROOTNAME=($sys)? 'TEXMFLOCAL':'TEXMFHOME';
+
+$INSTALLROOT=expand_var "$INSTALLROOTNAME";
($sys)? debug_msg "sys=true":debug_msg "sys=false";
@@ -188,7 +186,13 @@ $INSTALLROOT=~s/\\/\//g if ($INSTALLROOT=~/^\\\\/); # \\abc\def
debug_msg "Internal variable INSTALLROOT converted to '$INSTALLROOT'";
sub check_installroot {
- die "! ERROR: The install directory '$INSTALLROOT' doesn't exist.\n"
+ die "! ERROR: The variable $INSTALLROOTNAME is not set.\n"
+ unless length ("$INSTALLROOT") > 0;
+
+ die "! ERROR: The install directory '$INSTALLROOT' doesn't " .
+ "exist.\n" .
+ " If this is the correct path, please create " .
+ "this directory manually.\n"
unless (-d "$INSTALLROOT");
die "! ERROR: The install directory '$INSTALLROOT' is not writable.\n"
diff --git a/Master/bin/i386-linux/getnonfreefonts b/Master/bin/i386-linux/getnonfreefonts
index 969a251b52c..5965b4fc64a 100755
--- a/Master/bin/i386-linux/getnonfreefonts
+++ b/Master/bin/i386-linux/getnonfreefonts
@@ -107,7 +107,7 @@ sub expand_var {
}
while (<KPSEWHICH>) {
chop;
- return $_;
+ return "$_";
}
close KPSEWHICH;
}
@@ -172,11 +172,9 @@ if ($opt_debug) {
}
-if ($sys) {
- $INSTALLROOT=expand_var 'TEXMFLOCAL';
-} else {
- $INSTALLROOT=expand_var 'TEXMFHOME';
-}
+$INSTALLROOTNAME=($sys)? 'TEXMFLOCAL':'TEXMFHOME';
+
+$INSTALLROOT=expand_var "$INSTALLROOTNAME";
($sys)? debug_msg "sys=true":debug_msg "sys=false";
@@ -188,7 +186,13 @@ $INSTALLROOT=~s/\\/\//g if ($INSTALLROOT=~/^\\\\/); # \\abc\def
debug_msg "Internal variable INSTALLROOT converted to '$INSTALLROOT'";
sub check_installroot {
- die "! ERROR: The install directory '$INSTALLROOT' doesn't exist.\n"
+ die "! ERROR: The variable $INSTALLROOTNAME is not set.\n"
+ unless length ("$INSTALLROOT") > 0;
+
+ die "! ERROR: The install directory '$INSTALLROOT' doesn't " .
+ "exist.\n" .
+ " If this is the correct path, please create " .
+ "this directory manually.\n"
unless (-d "$INSTALLROOT");
die "! ERROR: The install directory '$INSTALLROOT' is not writable.\n"
diff --git a/Master/bin/i386-openbsd/getnonfreefonts b/Master/bin/i386-openbsd/getnonfreefonts
index 969a251b52c..5965b4fc64a 100755
--- a/Master/bin/i386-openbsd/getnonfreefonts
+++ b/Master/bin/i386-openbsd/getnonfreefonts
@@ -107,7 +107,7 @@ sub expand_var {
}
while (<KPSEWHICH>) {
chop;
- return $_;
+ return "$_";
}
close KPSEWHICH;
}
@@ -172,11 +172,9 @@ if ($opt_debug) {
}
-if ($sys) {
- $INSTALLROOT=expand_var 'TEXMFLOCAL';
-} else {
- $INSTALLROOT=expand_var 'TEXMFHOME';
-}
+$INSTALLROOTNAME=($sys)? 'TEXMFLOCAL':'TEXMFHOME';
+
+$INSTALLROOT=expand_var "$INSTALLROOTNAME";
($sys)? debug_msg "sys=true":debug_msg "sys=false";
@@ -188,7 +186,13 @@ $INSTALLROOT=~s/\\/\//g if ($INSTALLROOT=~/^\\\\/); # \\abc\def
debug_msg "Internal variable INSTALLROOT converted to '$INSTALLROOT'";
sub check_installroot {
- die "! ERROR: The install directory '$INSTALLROOT' doesn't exist.\n"
+ die "! ERROR: The variable $INSTALLROOTNAME is not set.\n"
+ unless length ("$INSTALLROOT") > 0;
+
+ die "! ERROR: The install directory '$INSTALLROOT' doesn't " .
+ "exist.\n" .
+ " If this is the correct path, please create " .
+ "this directory manually.\n"
unless (-d "$INSTALLROOT");
die "! ERROR: The install directory '$INSTALLROOT' is not writable.\n"
diff --git a/Master/bin/i386-solaris/getnonfreefonts b/Master/bin/i386-solaris/getnonfreefonts
index 969a251b52c..5965b4fc64a 100755
--- a/Master/bin/i386-solaris/getnonfreefonts
+++ b/Master/bin/i386-solaris/getnonfreefonts
@@ -107,7 +107,7 @@ sub expand_var {
}
while (<KPSEWHICH>) {
chop;
- return $_;
+ return "$_";
}
close KPSEWHICH;
}
@@ -172,11 +172,9 @@ if ($opt_debug) {
}
-if ($sys) {
- $INSTALLROOT=expand_var 'TEXMFLOCAL';
-} else {
- $INSTALLROOT=expand_var 'TEXMFHOME';
-}
+$INSTALLROOTNAME=($sys)? 'TEXMFLOCAL':'TEXMFHOME';
+
+$INSTALLROOT=expand_var "$INSTALLROOTNAME";
($sys)? debug_msg "sys=true":debug_msg "sys=false";
@@ -188,7 +186,13 @@ $INSTALLROOT=~s/\\/\//g if ($INSTALLROOT=~/^\\\\/); # \\abc\def
debug_msg "Internal variable INSTALLROOT converted to '$INSTALLROOT'";
sub check_installroot {
- die "! ERROR: The install directory '$INSTALLROOT' doesn't exist.\n"
+ die "! ERROR: The variable $INSTALLROOTNAME is not set.\n"
+ unless length ("$INSTALLROOT") > 0;
+
+ die "! ERROR: The install directory '$INSTALLROOT' doesn't " .
+ "exist.\n" .
+ " If this is the correct path, please create " .
+ "this directory manually.\n"
unless (-d "$INSTALLROOT");
die "! ERROR: The install directory '$INSTALLROOT' is not writable.\n"
diff --git a/Master/bin/mips-irix/getnonfreefonts b/Master/bin/mips-irix/getnonfreefonts
index 41f628becc0..5965b4fc64a 100755
--- a/Master/bin/mips-irix/getnonfreefonts
+++ b/Master/bin/mips-irix/getnonfreefonts
@@ -50,10 +50,7 @@ EOF
;
}
-unless (@ARGV) {
- usage;
- exit 1;
-}
+@ARGS=@ARGV;
GetOptions
"all|a",
@@ -72,6 +69,16 @@ $sys=1 if $opt_sys;
@allpackages=@ARGV;
+print "$TL_version\n" and exit 0 if $opt_version;
+
+if ($opt_help or !@ARGS) {
+ print "\nThis is getnonfreefonts";
+ print '-sys' if ($sys);
+ print ", version $TL_version.\n\n";
+ usage;
+}
+
+
sub message {
my $message=shift;
if ($message=~/^\[/) {
@@ -100,13 +107,12 @@ sub expand_var {
}
while (<KPSEWHICH>) {
chop;
- return $_;
+ return "$_";
}
close KPSEWHICH;
}
-
# get TMP|TEMP|TMPDIR environment variable
if ($opt_debug) {
@@ -119,8 +125,6 @@ if ($opt_debug) {
}
}
-print "$TL_version\n" and exit 0 if $opt_version;
-
if (defined $ENV{'TMP'}) {
$SYSTMP="$ENV{'TMP'}";
@@ -144,12 +148,13 @@ $SYSTMP=~s/\\/\//g if ($SYSTMP=~/^\\\\/); # \\abc\def
debug_msg "Internal variable SYSTMP converted to '$SYSTMP'";
+sub check_tmpdir{
die "! ERROR: The temporary directory '$SYSTMP' doesn't exist.\n"
unless (-d "$SYSTMP");
die "! ERROR: The temporary directory '$SYSTMP' is not writable.\n"
unless (-w "$SYSTMP");
-
+}
# Determine INSTALLROOT.
@@ -167,11 +172,9 @@ if ($opt_debug) {
}
-if ($sys) {
- $INSTALLROOT=expand_var 'TEXMFLOCAL';
-} else {
- $INSTALLROOT=expand_var 'TEXMFHOME';
-}
+$INSTALLROOTNAME=($sys)? 'TEXMFLOCAL':'TEXMFHOME';
+
+$INSTALLROOT=expand_var "$INSTALLROOTNAME";
($sys)? debug_msg "sys=true":debug_msg "sys=false";
@@ -182,28 +185,34 @@ $INSTALLROOT=~s/\\/\//g if ($INSTALLROOT=~/^\\\\/); # \\abc\def
debug_msg "Internal variable INSTALLROOT converted to '$INSTALLROOT'";
-die "! ERROR: The install directory '$INSTALLROOT' doesn't exist.\n"
- unless (-d "$INSTALLROOT");
-
-die "! ERROR: The install directory '$INSTALLROOT' is not writable.\n"
- unless (-w "$INSTALLROOT");
-
+sub check_installroot {
+ die "! ERROR: The variable $INSTALLROOTNAME is not set.\n"
+ unless length ("$INSTALLROOT") > 0;
-if ($opt_help) {
- print "\nThis is getnonfreefonts";
- print '-sys' if ($sys);
- print ", version $TL_version.\n\n";
+ die "! ERROR: The install directory '$INSTALLROOT' doesn't " .
+ "exist.\n" .
+ " If this is the correct path, please create " .
+ "this directory manually.\n"
+ unless (-d "$INSTALLROOT");
- usage;
+ die "! ERROR: The install directory '$INSTALLROOT' is not writable.\n"
+ unless (-w "$INSTALLROOT");
+}
+
+if ($opt_help or !@ARGS) {
print <<"ENDUSAGE";
Directories:
temporary: '$SYSTMP/getfont-<PID>'
install: '$INSTALLROOT'
ENDUSAGE
+check_tmpdir;
+check_installroot;
exit 0;
}
+check_tmpdir;
+check_installroot;
my $tmpdir="$SYSTMP/getfont-$$";
debug_msg "Internal variable tmpdir set to '$tmpdir'";
diff --git a/Master/bin/powerpc-aix/getnonfreefonts b/Master/bin/powerpc-aix/getnonfreefonts
index 969a251b52c..5965b4fc64a 100755
--- a/Master/bin/powerpc-aix/getnonfreefonts
+++ b/Master/bin/powerpc-aix/getnonfreefonts
@@ -107,7 +107,7 @@ sub expand_var {
}
while (<KPSEWHICH>) {
chop;
- return $_;
+ return "$_";
}
close KPSEWHICH;
}
@@ -172,11 +172,9 @@ if ($opt_debug) {
}
-if ($sys) {
- $INSTALLROOT=expand_var 'TEXMFLOCAL';
-} else {
- $INSTALLROOT=expand_var 'TEXMFHOME';
-}
+$INSTALLROOTNAME=($sys)? 'TEXMFLOCAL':'TEXMFHOME';
+
+$INSTALLROOT=expand_var "$INSTALLROOTNAME";
($sys)? debug_msg "sys=true":debug_msg "sys=false";
@@ -188,7 +186,13 @@ $INSTALLROOT=~s/\\/\//g if ($INSTALLROOT=~/^\\\\/); # \\abc\def
debug_msg "Internal variable INSTALLROOT converted to '$INSTALLROOT'";
sub check_installroot {
- die "! ERROR: The install directory '$INSTALLROOT' doesn't exist.\n"
+ die "! ERROR: The variable $INSTALLROOTNAME is not set.\n"
+ unless length ("$INSTALLROOT") > 0;
+
+ die "! ERROR: The install directory '$INSTALLROOT' doesn't " .
+ "exist.\n" .
+ " If this is the correct path, please create " .
+ "this directory manually.\n"
unless (-d "$INSTALLROOT");
die "! ERROR: The install directory '$INSTALLROOT' is not writable.\n"
diff --git a/Master/bin/powerpc-darwin/getnonfreefonts b/Master/bin/powerpc-darwin/getnonfreefonts
index 969a251b52c..5965b4fc64a 100755
--- a/Master/bin/powerpc-darwin/getnonfreefonts
+++ b/Master/bin/powerpc-darwin/getnonfreefonts
@@ -107,7 +107,7 @@ sub expand_var {
}
while (<KPSEWHICH>) {
chop;
- return $_;
+ return "$_";
}
close KPSEWHICH;
}
@@ -172,11 +172,9 @@ if ($opt_debug) {
}
-if ($sys) {
- $INSTALLROOT=expand_var 'TEXMFLOCAL';
-} else {
- $INSTALLROOT=expand_var 'TEXMFHOME';
-}
+$INSTALLROOTNAME=($sys)? 'TEXMFLOCAL':'TEXMFHOME';
+
+$INSTALLROOT=expand_var "$INSTALLROOTNAME";
($sys)? debug_msg "sys=true":debug_msg "sys=false";
@@ -188,7 +186,13 @@ $INSTALLROOT=~s/\\/\//g if ($INSTALLROOT=~/^\\\\/); # \\abc\def
debug_msg "Internal variable INSTALLROOT converted to '$INSTALLROOT'";
sub check_installroot {
- die "! ERROR: The install directory '$INSTALLROOT' doesn't exist.\n"
+ die "! ERROR: The variable $INSTALLROOTNAME is not set.\n"
+ unless length ("$INSTALLROOT") > 0;
+
+ die "! ERROR: The install directory '$INSTALLROOT' doesn't " .
+ "exist.\n" .
+ " If this is the correct path, please create " .
+ "this directory manually.\n"
unless (-d "$INSTALLROOT");
die "! ERROR: The install directory '$INSTALLROOT' is not writable.\n"
diff --git a/Master/bin/sparc-linux/getnonfreefonts b/Master/bin/sparc-linux/getnonfreefonts
index 969a251b52c..5965b4fc64a 100755
--- a/Master/bin/sparc-linux/getnonfreefonts
+++ b/Master/bin/sparc-linux/getnonfreefonts
@@ -107,7 +107,7 @@ sub expand_var {
}
while (<KPSEWHICH>) {
chop;
- return $_;
+ return "$_";
}
close KPSEWHICH;
}
@@ -172,11 +172,9 @@ if ($opt_debug) {
}
-if ($sys) {
- $INSTALLROOT=expand_var 'TEXMFLOCAL';
-} else {
- $INSTALLROOT=expand_var 'TEXMFHOME';
-}
+$INSTALLROOTNAME=($sys)? 'TEXMFLOCAL':'TEXMFHOME';
+
+$INSTALLROOT=expand_var "$INSTALLROOTNAME";
($sys)? debug_msg "sys=true":debug_msg "sys=false";
@@ -188,7 +186,13 @@ $INSTALLROOT=~s/\\/\//g if ($INSTALLROOT=~/^\\\\/); # \\abc\def
debug_msg "Internal variable INSTALLROOT converted to '$INSTALLROOT'";
sub check_installroot {
- die "! ERROR: The install directory '$INSTALLROOT' doesn't exist.\n"
+ die "! ERROR: The variable $INSTALLROOTNAME is not set.\n"
+ unless length ("$INSTALLROOT") > 0;
+
+ die "! ERROR: The install directory '$INSTALLROOT' doesn't " .
+ "exist.\n" .
+ " If this is the correct path, please create " .
+ "this directory manually.\n"
unless (-d "$INSTALLROOT");
die "! ERROR: The install directory '$INSTALLROOT' is not writable.\n"
diff --git a/Master/bin/sparc-solaris/getnonfreefonts b/Master/bin/sparc-solaris/getnonfreefonts
index 969a251b52c..5965b4fc64a 100755
--- a/Master/bin/sparc-solaris/getnonfreefonts
+++ b/Master/bin/sparc-solaris/getnonfreefonts
@@ -107,7 +107,7 @@ sub expand_var {
}
while (<KPSEWHICH>) {
chop;
- return $_;
+ return "$_";
}
close KPSEWHICH;
}
@@ -172,11 +172,9 @@ if ($opt_debug) {
}
-if ($sys) {
- $INSTALLROOT=expand_var 'TEXMFLOCAL';
-} else {
- $INSTALLROOT=expand_var 'TEXMFHOME';
-}
+$INSTALLROOTNAME=($sys)? 'TEXMFLOCAL':'TEXMFHOME';
+
+$INSTALLROOT=expand_var "$INSTALLROOTNAME";
($sys)? debug_msg "sys=true":debug_msg "sys=false";
@@ -188,7 +186,13 @@ $INSTALLROOT=~s/\\/\//g if ($INSTALLROOT=~/^\\\\/); # \\abc\def
debug_msg "Internal variable INSTALLROOT converted to '$INSTALLROOT'";
sub check_installroot {
- die "! ERROR: The install directory '$INSTALLROOT' doesn't exist.\n"
+ die "! ERROR: The variable $INSTALLROOTNAME is not set.\n"
+ unless length ("$INSTALLROOT") > 0;
+
+ die "! ERROR: The install directory '$INSTALLROOT' doesn't " .
+ "exist.\n" .
+ " If this is the correct path, please create " .
+ "this directory manually.\n"
unless (-d "$INSTALLROOT");
die "! ERROR: The install directory '$INSTALLROOT' is not writable.\n"
diff --git a/Master/bin/win32/getnonfreefonts.bat b/Master/bin/win32/getnonfreefonts.bat
index 91551f38d28..1967ce698b2 100644
--- a/Master/bin/win32/getnonfreefonts.bat
+++ b/Master/bin/win32/getnonfreefonts.bat
@@ -114,7 +114,7 @@ sub expand_var {
}
while (<KPSEWHICH>) {
chop;
- return $_;
+ return "$_";
}
close KPSEWHICH;
}
@@ -179,11 +179,9 @@ if ($opt_debug) {
}
-if ($sys) {
- $INSTALLROOT=expand_var 'TEXMFLOCAL';
-} else {
- $INSTALLROOT=expand_var 'TEXMFHOME';
-}
+$INSTALLROOTNAME=($sys)? 'TEXMFLOCAL':'TEXMFHOME';
+
+$INSTALLROOT=expand_var "$INSTALLROOTNAME";
($sys)? debug_msg "sys=true":debug_msg "sys=false";
@@ -195,7 +193,13 @@ $INSTALLROOT=~s/\\/\//g if ($INSTALLROOT=~/^\\\\/); # \\abc\def
debug_msg "Internal variable INSTALLROOT converted to '$INSTALLROOT'";
sub check_installroot {
- die "! ERROR: The install directory '$INSTALLROOT' doesn't exist.\n"
+ die "! ERROR: The variable $INSTALLROOTNAME is not set.\n"
+ unless length ("$INSTALLROOT") > 0;
+
+ die "! ERROR: The install directory '$INSTALLROOT' doesn't " .
+ "exist.\n" .
+ " If this is the correct path, please create " .
+ "this directory manually.\n"
unless (-d "$INSTALLROOT");
die "! ERROR: The install directory '$INSTALLROOT' is not writable.\n"
diff --git a/Master/bin/x86_64-linux/getnonfreefonts b/Master/bin/x86_64-linux/getnonfreefonts
index 969a251b52c..5965b4fc64a 100755
--- a/Master/bin/x86_64-linux/getnonfreefonts
+++ b/Master/bin/x86_64-linux/getnonfreefonts
@@ -107,7 +107,7 @@ sub expand_var {
}
while (<KPSEWHICH>) {
chop;
- return $_;
+ return "$_";
}
close KPSEWHICH;
}
@@ -172,11 +172,9 @@ if ($opt_debug) {
}
-if ($sys) {
- $INSTALLROOT=expand_var 'TEXMFLOCAL';
-} else {
- $INSTALLROOT=expand_var 'TEXMFHOME';
-}
+$INSTALLROOTNAME=($sys)? 'TEXMFLOCAL':'TEXMFHOME';
+
+$INSTALLROOT=expand_var "$INSTALLROOTNAME";
($sys)? debug_msg "sys=true":debug_msg "sys=false";
@@ -188,7 +186,13 @@ $INSTALLROOT=~s/\\/\//g if ($INSTALLROOT=~/^\\\\/); # \\abc\def
debug_msg "Internal variable INSTALLROOT converted to '$INSTALLROOT'";
sub check_installroot {
- die "! ERROR: The install directory '$INSTALLROOT' doesn't exist.\n"
+ die "! ERROR: The variable $INSTALLROOTNAME is not set.\n"
+ unless length ("$INSTALLROOT") > 0;
+
+ die "! ERROR: The install directory '$INSTALLROOT' doesn't " .
+ "exist.\n" .
+ " If this is the correct path, please create " .
+ "this directory manually.\n"
unless (-d "$INSTALLROOT");
die "! ERROR: The install directory '$INSTALLROOT' is not writable.\n"