2009-01-04 05:08:12 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Generate a header file with the current source revision
|
|
|
|
|
2011-02-16 02:37:09 -08:00
|
|
|
outdir=`pwd`
|
2009-01-04 05:08:12 +00:00
|
|
|
cd `dirname $0`
|
|
|
|
srcdir=..
|
2011-02-16 02:37:09 -08:00
|
|
|
header=$outdir/include/SDL_revision.h
|
2009-01-04 05:08:12 +00:00
|
|
|
|
|
|
|
rev=`sh showrev.sh`
|
2010-12-31 08:42:47 -08:00
|
|
|
if [ "$rev" != "" -a "$rev" != "hg-0:baadf00d" ]; then
|
2010-02-28 02:07:40 -05:00
|
|
|
echo "#define SDL_REVISION \"$rev\"" >$header.new
|
2009-01-04 05:08:12 +00:00
|
|
|
if diff $header $header.new >/dev/null 2>&1; then
|
|
|
|
rm $header.new
|
|
|
|
else
|
|
|
|
mv $header.new $header
|
|
|
|
fi
|
|
|
|
fi
|