Skip to content

Commit

Permalink
allow build script to detect cluster from hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
jaelynlitz committed Oct 27, 2023
1 parent ddd32b5 commit 94c60cb
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions buildsystem/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,21 +137,26 @@ fi

module purge

if [[ ! -v MY_CLUSTER ]]
then
export MY_CLUSTER=`uname -n | sed -e 's/[0-9]//g' -e 's/\..*//'`
fi

# Correctly identify clusters based on hostname
#case $MY_CLUSTER in
# incline*|dmi*)
# export MY_CLUSTER=incline
# ;;
# dl*|deception|*fat*)
# export MY_CLUSTER=deception
# ;;
# ascent*)
# export MY_CLUSTER=ascent
# ;;
# *)
# echo "Cluster $MY_CLUSTER not identified - you'll have to set relevant variables manually."
# ;;
#esac
case $MY_CLUSTER in
incline*|dmi*)
export MY_CLUSTER=incline
;;
dl*|deception|*fat*)
export MY_CLUSTER=deception
;;
ascent*)
export MY_CLUSTER=ascent
;;
*)
echo "Cluster $MY_CLUSTER not identified - you'll have to set relevant variables manually."
;;
esac

varfile="${SRCDIR}/buildsystem/${MY_CLUSTER}-env.sh"

Expand Down

0 comments on commit 94c60cb

Please sign in to comment.