Revision ae75676aa772924dfafe7e1d0a0a482e5b02d5f1 authored by Tim Haines on 30 July 2016, 07:52:18 UTC, committed by Tom Quinn on 06 September 2016, 16:43:04 UTC
Change-Id: I81b3a91ff347df4b97351fd5c2607628a17f65b0
1 parent f7a839d
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