mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-27 17:55:55 +02:00
add hg support to getver.sh (patch from #5763)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17432 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
dc9b2994c5
commit
be42404637
@ -23,5 +23,12 @@ try_git() {
|
|||||||
[ -n "$REV" ]
|
[ -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"
|
echo "$REV"
|
||||||
|
Loading…
Reference in New Issue
Block a user