4
0

subst.sh 223 B

12345678910111213141516
  1. #! /bin/sh
  2. if [ -x /bin/mktemp ]; then
  3. TEMP=`/bin/mktemp $1.$$.XXXXXX` || exit 1
  4. else
  5. TEMP=$1.$$.`date +"%S"`
  6. umask 177
  7. touch $TEMP
  8. fi
  9. sed -f subst $1 > $TEMP
  10. chmod +x $TEMP
  11. touch -r $1 $TEMP
  12. cp -p $TEMP $1
  13. rm $TEMP