diff options
author | Norbert Preining <preining@logic.at> | 2009-05-05 08:19:49 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2009-05-05 08:19:49 +0000 |
commit | 350d02c562cc18435ef0c3b941ccbad880281239 (patch) | |
tree | 2ad69b374f69c7bd2795fba1a3b81219deed8cb6 | |
parent | 77ba9f31d27f253281478aef703c7457eb8b0fc6 (diff) |
support perl and texlua script in the postaction code thingy
git-svn-id: svn://tug.org/texlive/branches/branch2009-dev@12930 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/tlpkg/TeXLive/TLUtils.pm | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index ed5e7380fcf..6ccda6d597a 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -1361,12 +1361,23 @@ sub _do_postaction_script { return 0; } my $file = $keyval{'file'}; - my $filew = $file; - $filew = $keyval{'filew32'} if defined($keyval{'filew32'}); + if (win32() && defined($keyval{'filew32'})) { + $file = $keyval{'filew32'}; + } my $texdir = `kpsewhich -var-value=SELFAUTOPARENT`; chomp($texdir); my @syscmd; - push @syscmd, (win32() ? "$texdir/$filew" : "$texdir/$file"), $texdir, $how; + if ($file =~ m/\.pl$/i) { + # we got a perl script, call it via perl + push @syscmd, "perl", "$texdir/$file"; + } elsif ($file =~ m/\.texlua$/i) { + # we got a texlua script, call it via texlua + push @syscmd, "texlua", "$texdir/$file"; + } else { + # we got anything else, call it directly and hope it is excutable + push @syscmd, "$texdir/$file"; + } + push @syscmd, $how, $texdir; my $ret = system (@syscmd); if ($ret != 0) { $ret /= 256 if $ret > 0; |