version 1.1, 2013/07/29 19:37:40
|
version 1.1.1.2, 2014/06/15 16:31:38
|
Line 12
|
Line 12
|
# first. This favours, eg v2.63 over 2.63rc6. |
# first. This favours, eg v2.63 over 2.63rc6. |
|
|
if which git >/dev/null 2>&1 && [ -d $1/.git ]; then |
if which git >/dev/null 2>&1 && [ -d $1/.git ]; then |
cd $1; git describe | cd $1; git describe | sed 's/^v//' |
elif grep '\$Format:%d\$' $1/VERSION >/dev/null 2>&1; then |
elif grep '\$Format:%d\$' $1/VERSION >/dev/null 2>&1; then |
# unsubstituted VERSION, but no git available. |
# unsubstituted VERSION, but no git available. |
echo UNKNOWN |
echo UNKNOWN |