scripts: add "r" to revision
343c3be454
accidentially removed the "r"
Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
parent
c9e3cd798d
commit
797fb8a302
|
@ -12,13 +12,14 @@ try_version() {
|
||||||
try_git() {
|
try_git() {
|
||||||
git rev-parse --git-dir >/dev/null 2>&1 || return 1
|
git rev-parse --git-dir >/dev/null 2>&1 || return 1
|
||||||
REV="$(git describe --match reboot | sed "s/reboot-\([0-9]*\)-.*/\1/g")"
|
REV="$(git describe --match reboot | sed "s/reboot-\([0-9]*\)-.*/\1/g")"
|
||||||
|
REV="${REV:+r$REV}"
|
||||||
[ -n "$REV" ]
|
[ -n "$REV" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
try_hg() {
|
try_hg() {
|
||||||
[ -d .hg ] || return 1
|
[ -d .hg ] || return 1
|
||||||
REV="$(hg log -r-1 --template '{desc}' | awk '{print $2}' | sed 's/\].*//')"
|
REV="$(hg log -r-1 --template '{desc}' | awk '{print $2}' | sed 's/\].*//')"
|
||||||
REV="${REV:+$REV}"
|
REV="${REV:+r$REV}"
|
||||||
[ -n "$REV" ]
|
[ -n "$REV" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue