Revision 5dfe48ba8684b34080d95fa045be4282b8bdab08 authored by Harshitha on 16 March 2016, 19:50:35 UTC, committed by Harshitha on 16 March 2016, 19:50:35 UTC
Change-Id: I78ccaedcf3eea7e07b820ef4ae9ad8356ce11f88
1 parent b79547b
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