diff options
author | Harald Welte <laforge@gnumonks.org> | 2015-10-25 21:00:20 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2015-10-25 21:00:20 +0100 |
commit | fca59bea770346cf1c1f9b0e00cb48a61b44a8f3 (patch) | |
tree | a2011270df48d3501892ac1a56015c8be57e8a7d /2005/flow-accounting-ols2005/OLS2005/Texmf/make-wrapper |
import of old now defunct presentation slides svn repo
Diffstat (limited to '2005/flow-accounting-ols2005/OLS2005/Texmf/make-wrapper')
-rwxr-xr-x | 2005/flow-accounting-ols2005/OLS2005/Texmf/make-wrapper | 24 |
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 |