diff options
author | Norbert Preining <preining@logic.at> | 2008-08-01 20:17:38 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-08-01 20:17:38 +0000 |
commit | cf6d52677450cdb0b66a77b7b343e6f4cc0cb37e (patch) | |
tree | 5e0d661aeeb4a768dfcd2a2caf02e5369af2bb85 /Master/tlpkg | |
parent | fb08896a057053aea9225e61d87d483baae28bd5 (diff) |
TLUtils: fix $null to $nul
git-svn-id: svn://tug.org/texlive/trunk@9992 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rw-r--r-- | Master/tlpkg/TeXLive/TLUtils.pm | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index 193c710b6d9..3db6ce468d8 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -1027,6 +1027,38 @@ sub setup_programs { } elsif (-r "$bindir/wget/wget.$platform") { $::progs{'wget'} = "$bindir/wget/wget.$platform"; } + # + # check that the programs are actually working + my $nul = "/dev/null"; + $nul = "nul" if ($^O =~ /^MSWin(32|64)$/i); + my $ret = system("$::progs{'lzmadec'} --help >$nul 2>$nul"); + if ($ret == -1) { + tlwarn ("Cannot start $::progs{'lzmadec'}: $!\n"); + return 0; + } + if ($ret > 0) { + tlwarn ("Starting $::progs{'lzmadec'} --help gave an error: $!\n"); + return 0; + } + $ret = system("$::progs{'tar'} --version >$nul 2>$nul"); + if ($ret == -1) { + tlwarn ("Cannot start $::progs{'tar'}: $!\n"); + return 0; + } + if ($ret > 0) { + tlwarn ("Starting $::progs{'tar'} --version gave an error: $!\n"); + return 0; + } + $ret = system("$::progs{'wget'} --version >$nul 2>$nul"); + if ($ret == -1) { + tlwarn ("Cannot start $::progs{'wget'}: $!\n"); + return 0; + } + if ($ret > 0) { + tlwarn ("Starting $::progs{'wget'} --version gave an error: $!\n"); + return 0; + } + return 1; } =pod |