summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2016-04-29 03:04:16 +0200
committerJohn Crispin <blogic@openwrt.org>2016-04-29 04:15:34 +0200
commit797fb8a302831a3d310e451bde4c8a262cddf00e (patch)
tree2318dc8eb4ca6601e867e337acff99dc64f7dd62 /scripts
parentc9e3cd798d0ccbde9fab32651c37d8c68e316f74 (diff)
downloadmaster-31e0f0ae-797fb8a302831a3d310e451bde4c8a262cddf00e.tar.gz
master-31e0f0ae-797fb8a302831a3d310e451bde4c8a262cddf00e.tar.bz2
master-31e0f0ae-797fb8a302831a3d310e451bde4c8a262cddf00e.zip
scripts: add "r" to revision
343c3be45451e4a11f03109bd6cb1dd9061ec5eb accidentially removed the "r" Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/getver.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/getver.sh b/scripts/getver.sh
index 60adc42e92..d0916713ad 100755
--- a/scripts/getver.sh
+++ b/scripts/getver.sh
@@ -12,13 +12,14 @@ try_version() {
try_git() {
git rev-parse --git-dir >/dev/null 2>&1 || return 1
REV="$(git describe --match reboot | sed "s/reboot-\([0-9]*\)-.*/\1/g")"
+ REV="${REV:+r$REV}"
[ -n "$REV" ]
}
try_hg() {
[ -d .hg ] || return 1
REV="$(hg log -r-1 --template '{desc}' | awk '{print $2}' | sed 's/\].*//')"
- REV="${REV:+$REV}"
+ REV="${REV:+r$REV}"
[ -n "$REV" ]
}