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!
slouken@2982
     1
#!/bin/sh
slouken@2982
     2
#
slouken@2982
     3
# Print the current source revision, if available
slouken@2982
     4
slouken@2982
     5
srcdir=`dirname $0`/..
slouken@2982
     6
slouken@2982
     7
if [ -d $srcdir/.svn ]; then
slouken@2982
     8
    cd $srcdir
slouken@3047
     9
    (svnversion -c 2>/dev/null || svnversion .) | \
slouken@3047
    10
        sed -e 's,\([0-9]*\)[A-Z]*,\1,' \
slouken@3047
    11
            -e 's,[0-9]*:\([0-9]*\)[A-Z]*,\1,'
slouken@3280
    12
else
slouken@3280
    13
     cd $srcdir
slouken@3280
    14
     git svn info | grep Revision | awk '{ print $2 }'
slouken@2982
    15
fi