1 if [ ! -r version ]; then echo 0 > version; fi
3 echo '\catcode`\#=12' > version.tex
4 awk ' { version = $1 + 1; }\
5 END { printf "\\def\\versiontag/{#2.%d}%%\n", version >> "version.tex"; \
6 printf "%d\n", version > "version"; }' < version
7 echo '\def\versiondate/{'`date`'}%' >> version.tex
8 echo '\catcode`\#=6' >> version.tex
9 echo '\tell{Version \versiontag/ of \versiondate/}' >> version.tex