build-scripts/snapshot.sh
author Sam Lantinga <slouken@libsdl.org>
Fri, 04 Feb 2011 12:22:52 -0800
changeset 5171 34e2d5115786
parent 5019 64a2d8f538a1
permissions -rwxr-xr-x
Removed unused variables
slouken@2982
     1
#!/bin/sh
slouken@2982
     2
#
slouken@2982
     3
# Generate a current snapshot from source control
slouken@2982
     4
slouken@2986
     5
echo "Checking out source"
slouken@5019
     6
hg clone http://hg.libsdl.org/SDL || exit $?
slouken@2982
     7
(cd SDL && ./autogen.sh && rm -rf autom4te.cache)
slouken@2982
     8
sh SDL/build-scripts/updaterev.sh
slouken@2982
     9
cp SDL/include/SDL_config.h.default SDL/include/SDL_config.h
slouken@2982
    10
slouken@2982
    11
major=`fgrep "#define SDL_MAJOR_VERSION" SDL/include/SDL_version.h | \
slouken@2982
    12
       sed 's,[^0-9]*\([0-9]*\),\1,'`
slouken@2982
    13
minor=`fgrep "#define SDL_MINOR_VERSION" SDL/include/SDL_version.h | \
slouken@2982
    14
       sed 's,[^0-9]*\([0-9]*\),\1,'`
slouken@2982
    15
patch=`fgrep "#define SDL_PATCHLEVEL" SDL/include/SDL_version.h | \
slouken@2982
    16
       sed 's,[^0-9]*\([0-9]*\),\1,'`
slouken@2982
    17
rev=`fgrep "#define SDL_REVISION" SDL/include/SDL_revision.h | \
slouken@5019
    18
       sed 's,[^0-9]*\([0-9]*\):.*,\1,'`
slouken@2982
    19
path="SDL-$major.$minor.$patch-$rev"
slouken@2982
    20
slouken@2982
    21
mv SDL $path
slouken@2986
    22
echo $path.tar.gz
slouken@2982
    23
tar zcf $path.tar.gz $path
slouken@2986
    24
echo $path.zip
slouken@2982
    25
rm -f $path.zip
slouken@2986
    26
zip -rq $path.zip $path
slouken@2982
    27
rm -rf $path