diff options
author | Norbert Preining <preining@logic.at> | 2010-06-02 02:25:04 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2010-06-02 02:25:04 +0000 |
commit | 971d104935df8759e33fa311cbd46e6de7c6cee0 (patch) | |
tree | 779ec24ac23a3bd87aadb8e4115f1bf328ea9aa4 /Master/texmf | |
parent | 9cdadc2bb8ba821c084d9807240b11f82c85c88d (diff) |
tlmgr.pl: use simpler way to distinguish between value not set or value
set to empty string in the texmf.cnf default file
git-svn-id: svn://tug.org/texlive/trunk@18694 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rwxr-xr-x | Master/texmf/scripts/texlive/tlmgr.pl | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index 00044919ede..2f1354d5fd0 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -4080,19 +4080,10 @@ sub action_conf { } else { info("$key not defined in $arg config file\n"); if ($arg eq "texmf") { - # for the case of texmf.cnf we check the default value - # kpsewhich returns 1 if the value is not set, and 0 if it is - # so to distinguish between a key that is not defined and - # a key that is defined but to the empty string we have to - # call first with system and check the return value, and then - # if the return value is true get the actual value with backticks!! - # what a pain - my $retval = system("kpsewhich -var-value $key >" - . (win32() ? "nul" : "/dev/null")); - if ($retval != 0) { + chomp (my $defval = `kpsewhich -var-value $key`); + if ($? != 0) { info("No default value for $key is known.\n"); } else { - chomp (my $defval = `kpsewhich -var-value $key`); info("Default value for $key is $defval\n"); } } |