findversion.sh: Handle YEAR part of .ottdrev-vc

This commit is contained in:
Jonathan G Rennison
2020-05-14 22:22:21 +01:00
parent 212f6f4dcb
commit 47a55afe6d

View File

@@ -101,12 +101,16 @@ 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' '`"
YEAR="`echo "$VERSION_DATA" | cut -f 7 -d' '`"
if [ -z "$ISTAG" ]; then
ISTAG="0"
fi
if [ -z "$ISSTABLETAG" ]; then
ISSTABLETAG="0"
fi
if [ -z "$YEAR" ]; then
YEAR=`echo ${ISODATE} | cut -c1-4`
fi
if [ "$MODIFIED" = "2" ]; then
VERSION="`echo "$VERSION" | sed -e 's/M$//'`"
fi