Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Latest commit

 

History

History
executable file
·
20 lines (18 loc) · 531 Bytes

updaterev.sh

File metadata and controls

executable file
·
20 lines (18 loc) · 531 Bytes
 
1
2
3
4
#!/bin/sh
#
# Generate a header file with the current source revision
Feb 16, 2011
Feb 16, 2011
5
outdir=`pwd`
6
7
cd `dirname $0`
srcdir=..
Feb 16, 2011
Feb 16, 2011
8
header=$outdir/include/SDL_revision.h
Feb 18, 2011
Feb 18, 2011
10
rev=`sh showrev.sh 2>/dev/null`
Dec 31, 2010
Dec 31, 2010
11
if [ "$rev" != "" -a "$rev" != "hg-0:baadf00d" ]; then
Feb 20, 2011
Feb 20, 2011
12
revnum=`echo $rev | sed 's,hg-\([0-9]*\).*,\1,'`
Feb 28, 2010
Feb 28, 2010
13
echo "#define SDL_REVISION \"$rev\"" >$header.new
Feb 20, 2011
Feb 20, 2011
14
echo "#define SDL_REVISION_NUMBER $revnum" >>$header.new
15
16
17
18
19
20
if diff $header $header.new >/dev/null 2>&1; then
rm $header.new
else
mv $header.new $header
fi
fi