diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-01-10 11:11:17 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-01-10 11:11:17 +0000 |
commit | 30be42ace99ca88d8a40301534b9f249d1b09d8c (patch) | |
tree | 0fffe7facd4c43fd76a78c11a44f1a52310f202a /Master/texmf/scripts/psutils/fixtpps.pl | |
parent | eacdb9d26d0740b92e709b25cd63d883c41162c4 (diff) |
chktex, ps2eps, psutils: install linked perl scripts
update ps2eps to 1.68
git-svn-id: svn://tug.org/texlive/trunk@21003 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf/scripts/psutils/fixtpps.pl')
-rwxr-xr-x | Master/texmf/scripts/psutils/fixtpps.pl | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Master/texmf/scripts/psutils/fixtpps.pl b/Master/texmf/scripts/psutils/fixtpps.pl new file mode 100755 index 00000000000..4239bb9dfc5 --- /dev/null +++ b/Master/texmf/scripts/psutils/fixtpps.pl @@ -0,0 +1,28 @@ +#!/usr/bin/env perl +# fixtpps: fix tpscript document to work with PSUtils +# +# Copyright (C) Angus J. C. Duggan 1991-1995 +# See file LICENSE for details. + +$nesting = 0; +$header = 1; + +while (<>) { + if (/^%%Page:/ && $nesting == 0) { + print $_; + print "save home\n"; + $header = 0; + } elsif (/^%%BeginDocument/ || /^%%BeginBinary/ || /^%%BeginFile/) { + print $_; + $nesting++; + } elsif (/^%%EndDocument/ || /^%%EndBinary/ || /^%%EndFile/) { + print $_; + $nesting--; + } elsif (/save home/) { + s/save home//; + print $_; + } elsif (!$header || (! /^save$/ && ! /^home$/)) { + print $_; + } +} + |