projects
/
librecmc
/
librecmc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c9e3cd7
)
scripts: add "r" to revision
author
John Crispin
<blogic@openwrt.org>
Fri, 29 Apr 2016 01:04:16 +0000
(
03:04
+0200)
committer
John Crispin
<blogic@openwrt.org>
Fri, 29 Apr 2016 02:15:34 +0000
(
04:15
+0200)
343c3be45451e4a11f03109bd6cb1dd9061ec5eb
accidentially removed the "r"
Signed-off-by: John Crispin <john@phrozen.org>
scripts/getver.sh
patch
|
blob
|
history
diff --git
a/scripts/getver.sh
b/scripts/getver.sh
index 60adc42e9244a7ae0e963baf8280b4401dc4aa4d..d0916713ad92a7a6f915fa5a281f3155bbfd5456 100755
(executable)
--- 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" ]
}