SDL-mirror/build-scripts/snapshot.sh
Sam Lantinga 0fde9f06da Make the current revision number available
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403444
2009-01-04 05:08:12 +00:00

24 lines
805 B
Bash
Executable file

#!/bin/sh
#
# Generate a current snapshot from source control
svn co http://svn.libsdl.org/trunk/SDL
(cd SDL && ./autogen.sh && rm -rf autom4te.cache)
sh SDL/build-scripts/updaterev.sh
cp SDL/include/SDL_config.h.default SDL/include/SDL_config.h
major=`fgrep "#define SDL_MAJOR_VERSION" SDL/include/SDL_version.h | \
sed 's,[^0-9]*\([0-9]*\),\1,'`
minor=`fgrep "#define SDL_MINOR_VERSION" SDL/include/SDL_version.h | \
sed 's,[^0-9]*\([0-9]*\),\1,'`
patch=`fgrep "#define SDL_PATCHLEVEL" SDL/include/SDL_version.h | \
sed 's,[^0-9]*\([0-9]*\),\1,'`
rev=`fgrep "#define SDL_REVISION" SDL/include/SDL_revision.h | \
sed 's,[^0-9]*\([0-9]*\),\1,'`
path="SDL-$major.$minor.$patch-$rev"
mv SDL $path
tar zcf $path.tar.gz $path
rm -f $path.zip
zip -r $path.zip $path
rm -rf $path