Revision faa6f1c3 version.sh

View differences:

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

  
3
revision=$(cd "$1" && cat snapshot_version 2> /dev/null)
4
test "$revision" && revision=SVN-r$revision
5

  
6 3
# check for git short hash
7
if ! test "$revision"; then
8
    revision=$(cd "$1" && git describe --always 2> /dev/null)
9
    test "$revision" && revision=git-$revision
10
fi
4
revision=$(cd "$1" && git describe --always 2> /dev/null)
5
test "$revision" && revision=git-$revision
11 6

  
12 7
# no revision number found
13 8
test "$revision" || revision=UNKNOWN

Also available in: Unified diff