summaryrefslogtreecommitdiffstats
path: root/subst.sh
blob: 25606d30fcc463e32d13bbed565835d14ca8410d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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