summaryrefslogtreecommitdiff
path: root/2005/flow-accounting-ols2005/OLS2005/Texmf/make-wrapper
diff options
context:
space:
mode:
Diffstat (limited to '2005/flow-accounting-ols2005/OLS2005/Texmf/make-wrapper')
-rwxr-xr-x2005/flow-accounting-ols2005/OLS2005/Texmf/make-wrapper24
1 files changed, 24 insertions, 0 deletions
diff --git a/2005/flow-accounting-ols2005/OLS2005/Texmf/make-wrapper b/2005/flow-accounting-ols2005/OLS2005/Texmf/make-wrapper
new file mode 100755
index 0000000..820bb83
--- /dev/null
+++ b/2005/flow-accounting-ols2005/OLS2005/Texmf/make-wrapper
@@ -0,0 +1,24 @@
+#! /bin/sh
+
+if [ $# -eq 2 ]; then
+ output="${2%.stmp}.tex"
+ page=1
+elif [ $# -eq 3 ]; then
+ output="${3%.stmp}.tex"
+ page=$(sed -ne 's:^\\newlabel{NextPage}{{}{\([0-9][0-9]*\)}}$:\1:p' "$2")
+else
+ echo "usage: $0 defs-file [prior-aux-file] output" >&2
+ exit 2
+fi
+
+defs="$1"
+wrapped="${output%-proc.tex}.tex"
+wrapped="${wrapped#*/}"
+{
+ cat "$defs"
+ echo '\def\ProcPage{'$page'}'
+ echo '\input' "$wrapped"
+} > "${output}T"
+
+./Texmf/move-if-change "${output}T" "$output"
+exit 0
personal git repositories of Harald Welte. Your mileage may vary