diff options
Diffstat (limited to 'Master/tlpkg/bin/c2l')
-rwxr-xr-x | Master/tlpkg/bin/c2l | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/Master/tlpkg/bin/c2l b/Master/tlpkg/bin/c2l index c7356d53695..e239adaa5bd 100755 --- a/Master/tlpkg/bin/c2l +++ b/Master/tlpkg/bin/c2l @@ -5,13 +5,19 @@ # Convenience front-end script to run ctan2tl. It rearranges the output # so error messages come first, then the list of changed files. Also # accepts platform abbreviations to run tl-update-bindir, etc. Don't -# take it too seriously; it surely need generalizing for use by anyone -# else. Uses various personal environment variables, etc. +# take it too seriously; it surely needs generalizing. + +use Cwd; +use File::Basename; $| = 1; exit (&main ()); sub main { + my $real0 = Cwd::abs_path ($0); + my $scriptdir = File::Basename::dirname ($real0); # .../Master/tlpkg/bin + my $TLROOT = Cwd::abs_path ("$scriptdir/../../.."); # ... + # platform abbrev my $arg = $ARGV[0]; if ($arg eq "asy") { @@ -79,7 +85,7 @@ sub main { exit 0; } - if (-d "$ENV{xb}/$arg") { + if (-d "$TLROOT/Master/bin/$arg") { print ("tl-update-bindir $arg\n"); exec ("tl-update-bindir", $arg); } @@ -92,8 +98,8 @@ sub main { my @lines = `set -o pipefail; ctan2tl @ARGV </dev/null 2>&1 | tee /tmp/cl.out`; my $status = $?; - -d "$ENV{B}/tmp.cooked" - && system ("cp /tmp/cl.out $ENV{B}/tmp.cooked/$ARGV[$#ARGV].out"); + my $cooked = "$TLROOT/Build/tmp.cooked"; + -d $cooked && system ("cp /tmp/cl.out $cooked/$ARGV[$#ARGV].out"); # *** and other notable messages. my @msgs = grep { /^\*\*\*.* \S/ |