Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Latest commit

 

History

History
executable file
·
27 lines (24 loc) · 875 Bytes

snapshot.sh

File metadata and controls

executable file
·
27 lines (24 loc) · 875 Bytes
 
1
2
3
4
#!/bin/sh
#
# Generate a current snapshot from source control
Jan 4, 2009
Jan 4, 2009
5
echo "Checking out source"
Jan 18, 2011
Jan 18, 2011
6
hg clone http://hg.libsdl.org/SDL || exit $?
7
8
9
10
11
12
13
14
15
16
17
(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 | \
Jan 18, 2011
Jan 18, 2011
18
sed 's,[^0-9]*\([0-9]*\):.*,\1,'`
19
20
21
path="SDL-$major.$minor.$patch-$rev"
mv SDL $path
Jan 4, 2009
Jan 4, 2009
22
echo $path.tar.gz
23
tar zcf $path.tar.gz $path
Jan 4, 2009
Jan 4, 2009
24
echo $path.zip
25
rm -f $path.zip
Jan 4, 2009
Jan 4, 2009
26
zip -rq $path.zip $path
27
rm -rf $path