chiark / gitweb /
layout/psenlarge: break ps enlargement rune out from Makefile into new script
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 28 Nov 2010 15:34:24 +0000 (15:34 +0000)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 28 Nov 2010 15:34:24 +0000 (15:34 +0000)
layout/Makefile
layout/psenlarge [new file with mode: 0755]

index 37d2860130ea1296faf79365b7025dc4c7099d38..6bde4b2054f1b4619e07ba2f8a194c1f64e4d038 100644 (file)
@@ -94,9 +94,7 @@ compose-segenco: compose-segenco.o
 LARGE_PS_FACTOR=3
 
 %.large.ps:    %.ps
-               pstops '0@3' <$< >$@.tmp
-               perl -p -e 's/\d+/ $$& * ${LARGE_PS_FACTOR} /eg' \
-                       -e '    if m/^\%\%.*BoundingBox/' <$@.tmp $o
+               ./psenlarge ${LARGE_PS_FACTOR} $< $o
 
 %.raw.neato:   %.redactgraph
                ./$< consistency printforneato $o
diff --git a/layout/psenlarge b/layout/psenlarge
new file mode 100755 (executable)
index 0000000..086fade
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+set -e
+set -o pipefail
+factor=$1; shift
+
+pstops "0@$factor" "$@" |
+  perl -p -e 's/\d+/ $& * '$factor' /eg if m/^\%\%.*BoundingBox/'