From 174072ff0da094899d051817c5a4c184fd4ca0a5 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 7 Jul 2008 00:38:30 +0000 Subject: add universal-darwin binaries and support git-svn-id: svn://tug.org/texlive/trunk@9317 c570f23f-e606-0410-a88d-b1316a301751 --- Master/bin/universal-darwin/fixtpps | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 Master/bin/universal-darwin/fixtpps (limited to 'Master/bin/universal-darwin/fixtpps') diff --git a/Master/bin/universal-darwin/fixtpps b/Master/bin/universal-darwin/fixtpps new file mode 100755 index 00000000000..4239bb9dfc5 --- /dev/null +++ b/Master/bin/universal-darwin/fixtpps @@ -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 $_; + } +} + -- cgit v1.2.3