projects
/
openwrt
/
staging
/
aparcar.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ce5869b
)
add hg support to getver.sh (patch from #5763)
author
Felix Fietkau
<nbd@openwrt.org>
Fri, 28 Aug 2009 12:51:01 +0000
(12:51 +0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Fri, 28 Aug 2009 12:51:01 +0000
(12:51 +0000)
SVN-Revision: 17432
scripts/getver.sh
patch
|
blob
|
history
diff --git
a/scripts/getver.sh
b/scripts/getver.sh
index 5155792016ad8af36e63db9a7d3654b14eb9e8eb..19c8c05cde7658702a0ecc33ae849d953e15d5ff 100755
(executable)
--- 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"