build-scripts/updaterev.sh
changeset 2982 b64c1d23039b
child 4419 5e7e1f1a4056
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/build-scripts/updaterev.sh	Sun Jan 04 05:08:12 2009 +0000
     1.3 @@ -0,0 +1,17 @@
     1.4 +#!/bin/sh
     1.5 +#
     1.6 +# Generate a header file with the current source revision
     1.7 +
     1.8 +cd `dirname $0`
     1.9 +srcdir=..
    1.10 +header=$srcdir/include/SDL_revision.h
    1.11 +
    1.12 +rev=`sh showrev.sh`
    1.13 +if [ "$rev" != "" ]; then
    1.14 +    echo "#define SDL_REVISION $rev" >$header.new
    1.15 +    if diff $header $header.new >/dev/null 2>&1; then
    1.16 +        rm $header.new
    1.17 +    else
    1.18 +        mv $header.new $header
    1.19 +    fi
    1.20 +fi