mkver (319B)
1 #!/bin/sh 2 3 trap 'rm -f $$.tmp' EXIT HUP INT QUIT TERM 4 5 git=`git show-ref --head | awk '$2 == "HEAD" {print substr($1, 1, 8)}'` 6 ver=`sed -n '/OS9VERSION/ s/.*"\(.*\)"/\1/p' version.h 2>/dev/null` 7 8 if test "$ver" = "$git" 9 then 10 exit 11 fi 12 13 rm -f version.h 14 15 echo '#define OS9VERSION "'$git'"' > $$.tmp && 16 mv $$.tmp version.h