diff options
Diffstat (limited to 'Master/texmf-dist/source/eplain/base/add-version')
-rw-r--r-- | Master/texmf-dist/source/eplain/base/add-version | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/eplain/base/add-version b/Master/texmf-dist/source/eplain/base/add-version new file mode 100644 index 00000000000..1934c8957f6 --- /dev/null +++ b/Master/texmf-dist/source/eplain/base/add-version @@ -0,0 +1,24 @@ +#!/bin/sh +# This file is public domain. + +if test $# -lt 2; then + echo "Usage: $0 <version> [<file> <file> ...]" + exit 1 +fi + +temp=${TMPDIR-/tmp}/version$$ + +version=$1 +shift + +for f in "$@"; do + sed "s/REPLACE-WITH-VERSION/$version/" <$f >$temp || exit 1 + if cmp -s $f $temp; then + echo "$f: No REPLACE-WITH-VERSION." + exit 1 + fi + rm -f $f + mv $temp $f +done + +rm -f $temp |