aboutsummaryrefslogtreecommitdiff
path: root/subst.sh
diff options
context:
space:
mode:
Diffstat (limited to 'subst.sh')
-rwxr-xr-xsubst.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/subst.sh b/subst.sh
new file mode 100755
index 00000000..25606d30
--- /dev/null
+++ b/subst.sh
@@ -0,0 +1,16 @@
+#! /bin/sh
+
+if [ -x /bin/mktemp ]; then
+ TEMP=`/bin/mktemp $1.$$.XXXXXX` || exit 1
+else
+ TEMP=$1.$$.`date +"%S"`
+ umask 177
+ touch $TEMP
+fi
+
+sed -f subst $1 > $TEMP
+
+chmod +x $TEMP
+touch -r $1 $TEMP
+cp -p $TEMP $1
+rm $TEMP