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