From 0115af25f7f857ee7c0d4bf8b87a7c11d0ba77df Mon Sep 17 00:00:00 2001 From: Ray Culbertson Date: Wed, 10 Aug 2022 12:31:29 -0500 Subject: [PATCH] add backup and protection for finding flavor --- bin/museSetup.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bin/museSetup.sh b/bin/museSetup.sh index eb3916d..eddfd82 100755 --- a/bin/museSetup.sh +++ b/bin/museSetup.sh @@ -217,6 +217,14 @@ if ! which ups >& /dev/null ; then fi export MUSE_FLAVOR=$( ups flavor | awk -F- '{print $3}' ) +if [[ -z "$MUSE_FLAVOR" && -n "$UPS_OVERRIDE" ]]; then + export MUSE_FLAVOR=$( echo $UPS_OVERRIDE | awk -F- '{print $3}' ) +fi +if [ -z "$MUSE_FLAVOR" ]; then + echo "ERROR - could not run ups flavor, you might need to set UPS_OVERRIDE" + errorMessage + return 1 +fi # # parse arguments - everything should be a qualifier