From 9673f6a70ca248cab54c9685a68c2034f8c686b9 Mon Sep 17 00:00:00 2001 From: Charles Pigott Date: Wed, 31 Mar 2021 14:23:48 +0100 Subject: [PATCH] Codechange: Prioritise .ottdrev file over git checkout --- findversion.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/findversion.sh b/findversion.sh index 8e31219..ce1649a 100755 --- a/findversion.sh +++ b/findversion.sh @@ -57,7 +57,12 @@ ROOT_DIR=`pwd` # Determine if we are using a modified version # Assume the dir is not modified MODIFIED="0" -if [ -d "$ROOT_DIR/.git" ] || [ -f "$ROOT_DIR/.git" ]; then +if [ -f "$ROOT_DIR/.ottdrev" ]; then + # We are an exported source bundle + cat $ROOT_DIR/.ottdrev + exit + +elif [ -d "$ROOT_DIR/.git" ] || [ -f "$ROOT_DIR/.git" ]; then # We are a git checkout # Refresh the index to make sure file stat info is in sync, then look for modifications git update-index --refresh >/dev/null @@ -92,10 +97,6 @@ if [ -d "$ROOT_DIR/.git" ] || [ -f "$ROOT_DIR/.git" ]; then ISSTABLETAG="0" fi -elif [ -f "$ROOT_DIR/.ottdrev" ]; then - # We are an exported source bundle - cat $ROOT_DIR/.ottdrev - exit else # We don't know MODIFIED="1"