From f8724beb298d3524fa9309467fd9068f53adb4b5 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Tue, 26 Mar 2019 17:39:46 +0000 Subject: [PATCH] findversion.sh: Handle case where tag/stable tag is missing from .ottdrev-vc --- findversion.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/findversion.sh b/findversion.sh index 0a92f1360c..c6ed44a1b1 100755 --- a/findversion.sh +++ b/findversion.sh @@ -102,6 +102,12 @@ elif [ -f "$ROOT_DIR/.ottdrev-vc" ]; then HASH="`echo "$VERSION_DATA" | cut -f 4 -d' '`" ISTAG="`echo "$VERSION_DATA" | cut -f 5 -d' '`" ISSTABLETAG="`echo "$VERSION_DATA" | cut -f 6 -d' '`" + if [ -z "$ISTAG" ]; then + ISTAG="0" + fi + if [ -z "$ISSTABLETAG" ]; then + ISSTABLETAG="0" + fi if [ "$MODIFIED" = "2" ]; then VERSION="`echo "$VERSION" | sed -e 's/M$//'`" fi