SDL-mirror/build-scripts/showrev.sh
Sam Lantinga 897fcf93b0 Updated for older versions of subversion
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403510
2009-01-19 07:35:52 +00:00

12 lines
275 B
Bash
Executable file

#!/bin/sh
#
# Print the current source revision, if available
srcdir=`dirname $0`/..
if [ -d $srcdir/.svn ]; then
cd $srcdir
(svnversion -c 2>/dev/null || svnversion .) | \
sed -e 's,\([0-9]*\)[A-Z]*,\1,' \
-e 's,[0-9]*:\([0-9]*\)[A-Z]*,\1,'
fi