Revision 8be9a92656b22692268b07c916c2c521de258977 authored by Tom Quinn on 29 June 2012, 22:53:33 UTC, committed by Tom Quinn on 02 September 2016, 04:35:19 UTC
Change-Id: Ie70c17a09b70be7ab7f769b6122910b821ef1f38
1 parent 648ae51
Raw File
commitid.sh
#!/bin/sh

# Get a string describing the current code, and compare it to the
# recorded value in VERSION. Copy over that if it's changed, so that
# Make sees a more recent file.

VOLD=""
if test -r VERSION
then
    VOLD=`cat VERSION`
fi

#git describe --long --dirty --always > VERSION.new || touch VERSION.new
git describe --long --always > VERSION.new || touch VERSION.new

VNEW=`cat VERSION.new`

if test -n "$VNEW" -a "$VOLD" != "$VNEW"
then
    cp VERSION.new VERSION
    echo Copying VERSION.new = $VNEW over VERSION = $VOLD
fi
back to top