Skip to content
Snippets Groups Projects
Commit cbb9a14d authored by Felix Fietkau's avatar Felix Fietkau
Browse files

add hg support to getver.sh (patch from #5763)

SVN-Revision: 17432
parent ce5869bd
No related branches found
No related tags found
No related merge requests found
...@@ -23,5 +23,12 @@ try_git() { ...@@ -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"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment