2 #Print the git revision in the form yyyymmdd-abc1234
3 #Note: yyyymmdd is the date that abc1234 was committed and not today's date.
6 if [ "$?" != "0" ]; then
10 git
--no-pager log
--abbrev=7 -n 1 --pretty=format
:"%h %ci" HEAD |
awk '{gsub("-", "");print $2"-"$1}' 2>/dev
/null
11 if [ "$?" != "0" ]; then