comparison build-scripts/snapshot.sh @ 2982:b64c1d23039b

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