Mercurial > sdl-ios-xcode
comparison build-scripts/showrev.sh @ 4419:5e7e1f1a4056
Changed revision details to be a string (an hg changeset) instead of an int.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sun, 28 Feb 2010 02:07:40 -0500 |
parents | 00cace2d9080 |
children | fa77a6429698 |
comparison
equal
deleted
inserted
replaced
4418:be1929ccaa3d | 4419:5e7e1f1a4056 |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 # | 2 # |
3 # Print the current source revision, if available | 3 # Print the current source revision, if available |
4 | 4 |
5 srcdir=`dirname $0`/.. | 5 # FIXME: this prints the tip, which isn't useful if you're on a different |
6 # branch, or just not sync'd to the tip. | |
7 hg tip --template 'hg-{rev}:{node|short}' | |
6 | 8 |
7 if [ -d $srcdir/.svn ]; then | |
8 cd $srcdir | |
9 (svnversion -c 2>/dev/null || svnversion .) | \ | |
10 sed -e 's,\([0-9]*\)[A-Z]*,\1,' \ | |
11 -e 's,[0-9]*:\([0-9]*\)[A-Z]*,\1,' | |
12 else | |
13 cd $srcdir | |
14 git svn info | grep Revision | awk '{ print $2 }' | |
15 fi |