1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00
GLideN64/src/getRevision.sh
fzurita de7547727b Don't generate a new Revision.h file if revision hasn't changed
This prevent CMake from forcing a build of everything that depends on
that file.
2019-12-16 14:21:44 +07:00

13 lines
400 B
Bash
Executable File

SCRIPT_DIRECTORY=`dirname $0`
rev=\"`git rev-parse --short HEAD`\"
lastrev=$(head -n 1 $SCRIPT_DIRECTORY/Revision.h | awk -F'PLUGIN_REVISION ' {'print $2'})
echo current revision $rev
echo last build revision $lastrev
if [ "$lastrev" != "$rev" ]
then
echo "#define PLUGIN_REVISION $rev" > $SCRIPT_DIRECTORY/Revision.h
echo "#define PLUGIN_REVISION_W L$rev" >> $SCRIPT_DIRECTORY/Revision.h
fi