build-scripts/showrev.sh
author Sam Lantinga <slouken@libsdl.org>
Wed, 07 Oct 2009 06:11:53 +0000
changeset 3351 8e0182c236d8
parent 3280 00cace2d9080
child 4419 5e7e1f1a4056
permissions -rwxr-xr-x
SuSE 11.1 installs directfb-config without directfb-devel, so check to
make sure the development headers are actually available!
     1 #!/bin/sh
     2 #
     3 # Print the current source revision, if available
     4 
     5 srcdir=`dirname $0`/..
     6 
     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