aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/getver.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/getver.sh b/scripts/getver.sh
index 49260a2260..61906040b1 100755
--- a/scripts/getver.sh
+++ b/scripts/getver.sh
@@ -21,7 +21,7 @@ try_git() {
r*)
GET_REV="$(echo $GET_REV | tr -d 'r')"
BASE_REV="$(git rev-list ${REBOOT}..HEAD 2>/dev/null | wc -l | awk '{print $1}')"
- REV="$(git rev-parse HEAD~$((BASE_REV - GET_REV)))"
+ [ $((BASE_REV - GET_REV)) -ge 0 ] && REV="$(git rev-parse HEAD~$((BASE_REV - GET_REV)))"
;;
*)
BRANCH="$(git rev-parse --abbrev-ref HEAD)"