Revision 2b229186 version.sh

View differences:

version.sh
1 1
#!/bin/sh
2 2

  
3 3
# check for SVN revision number
4
revision=$(cat snapshot_version)
4
revision=$(cat snapshot_version 2> /dev/null)
5 5
test $revision || revision=$(cd "$1" && LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2)
6 6
test $revision || revision=$(cd "$1" && grep revision .svn/entries 2>/dev/null | cut -d '"' -f2)
7 7
test $revision || revision=$(cd "$1" && sed -n -e '/^dir$/{n;p;q}' .svn/entries 2>/dev/null)

Also available in: Unified diff