diff options
author | Felix Fietkau <nbd@openwrt.org> | 2009-08-28 12:51:01 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2009-08-28 12:51:01 +0000 |
commit | cbb9a14d8a5a958f144f1f53eee890d5bddc6210 (patch) | |
tree | 8ca753e64264c2589202c7f7b9f1088df55addcd | |
parent | ce5869bd9b6ba6fe4c28123a21f41282d5916e81 (diff) | |
download | upstream-cbb9a14d8a5a958f144f1f53eee890d5bddc6210.tar.gz upstream-cbb9a14d8a5a958f144f1f53eee890d5bddc6210.tar.bz2 upstream-cbb9a14d8a5a958f144f1f53eee890d5bddc6210.zip |
add hg support to getver.sh (patch from #5763)
SVN-Revision: 17432
-rwxr-xr-x | scripts/getver.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/getver.sh b/scripts/getver.sh index 5155792016..19c8c05cde 100755 --- a/scripts/getver.sh +++ b/scripts/getver.sh @@ -23,5 +23,12 @@ try_git() { [ -n "$REV" ] } -try_version || try_svn || try_git || REV="unknown" +try_hg() { + [ -d .hg ] || return 1 + REV="$(hg log -r-1 --template '{desc}' | awk '{print $2}' | sed 's/\].*//')" + REV="${REV:+$REV}" + [ -n "$REV" ] +} + +try_version || try_svn || try_git || try_hg || REV="unknown" echo "$REV" |