summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/eplain/base/add-version
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-11 23:03:17 +0000
committerKarl Berry <karl@freefriends.org>2006-01-11 23:03:17 +0000
commitecf966f305f6aeff2bbdf42c82d8425921aa9eda (patch)
treedb606a57e3619610e4c35cae849d41cf4e0937d5 /Master/texmf-dist/source/eplain/base/add-version
parentac3c55a3216b5988f0e48ba9414ddb059f19a699 (diff)
source 1
git-svn-id: svn://tug.org/texlive/trunk@105 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/eplain/base/add-version')
-rw-r--r--Master/texmf-dist/source/eplain/base/add-version24
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