build-scripts/snapshot.sh
changeset 2982 b64c1d23039b
child 2986 bb773ff79106
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/build-scripts/snapshot.sh	Sun Jan 04 05:08:12 2009 +0000
     1.3 @@ -0,0 +1,24 @@
     1.4 +#!/bin/sh
     1.5 +#
     1.6 +# Generate a current snapshot from source control
     1.7 +
     1.8 +svn co http://svn.libsdl.org/trunk/SDL
     1.9 +(cd SDL && ./autogen.sh && rm -rf autom4te.cache)
    1.10 +sh SDL/build-scripts/updaterev.sh
    1.11 +cp SDL/include/SDL_config.h.default SDL/include/SDL_config.h
    1.12 +
    1.13 +major=`fgrep "#define SDL_MAJOR_VERSION" SDL/include/SDL_version.h | \
    1.14 +       sed 's,[^0-9]*\([0-9]*\),\1,'`
    1.15 +minor=`fgrep "#define SDL_MINOR_VERSION" SDL/include/SDL_version.h | \
    1.16 +       sed 's,[^0-9]*\([0-9]*\),\1,'`
    1.17 +patch=`fgrep "#define SDL_PATCHLEVEL" SDL/include/SDL_version.h | \
    1.18 +       sed 's,[^0-9]*\([0-9]*\),\1,'`
    1.19 +rev=`fgrep "#define SDL_REVISION" SDL/include/SDL_revision.h | \
    1.20 +       sed 's,[^0-9]*\([0-9]*\),\1,'`
    1.21 +path="SDL-$major.$minor.$patch-$rev"
    1.22 +
    1.23 +mv SDL $path
    1.24 +tar zcf $path.tar.gz $path
    1.25 +rm -f $path.zip
    1.26 +zip -r $path.zip $path
    1.27 +rm -rf $path