build-scripts/snapshot.sh
author Sam Lantinga <slouken@libsdl.org>
Sun, 04 Jan 2009 05:08:12 +0000
changeset 2982 b64c1d23039b
child 2986 bb773ff79106
permissions -rwxr-xr-x
Make the current revision number available
slouken@2982
     1
#!/bin/sh
slouken@2982
     2
#
slouken@2982
     3
# Generate a current snapshot from source control
slouken@2982
     4
slouken@2982
     5
svn co http://svn.libsdl.org/trunk/SDL
slouken@2982
     6
(cd SDL && ./autogen.sh && rm -rf autom4te.cache)
slouken@2982
     7
sh SDL/build-scripts/updaterev.sh
slouken@2982
     8
cp SDL/include/SDL_config.h.default SDL/include/SDL_config.h
slouken@2982
     9
slouken@2982
    10
major=`fgrep "#define SDL_MAJOR_VERSION" SDL/include/SDL_version.h | \
slouken@2982
    11
       sed 's,[^0-9]*\([0-9]*\),\1,'`
slouken@2982
    12
minor=`fgrep "#define SDL_MINOR_VERSION" SDL/include/SDL_version.h | \
slouken@2982
    13
       sed 's,[^0-9]*\([0-9]*\),\1,'`
slouken@2982
    14
patch=`fgrep "#define SDL_PATCHLEVEL" SDL/include/SDL_version.h | \
slouken@2982
    15
       sed 's,[^0-9]*\([0-9]*\),\1,'`
slouken@2982
    16
rev=`fgrep "#define SDL_REVISION" SDL/include/SDL_revision.h | \
slouken@2982
    17
       sed 's,[^0-9]*\([0-9]*\),\1,'`
slouken@2982
    18
path="SDL-$major.$minor.$patch-$rev"
slouken@2982
    19
slouken@2982
    20
mv SDL $path
slouken@2982
    21
tar zcf $path.tar.gz $path
slouken@2982
    22
rm -f $path.zip
slouken@2982
    23
zip -r $path.zip $path
slouken@2982
    24
rm -rf $path