From 55e68343c6612f5f4bbe783f1684bab188caacd1 Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Tue, 29 Aug 2023 12:18:07 -0500 Subject: [PATCH] Add python load to setup.sh for orion --- setup.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 84c7412e0..6ecbf4819 100755 --- a/setup.sh +++ b/setup.sh @@ -1,8 +1,13 @@ -# Use '-i' when sourcing this file to attempt to reset $PATH to system defaults (i.e., based on /etc/profile) +# Use '-i' when sourcing this file to attempt to reset $PATH to system defaults (i.e., based on /etc/profile), +# then load any modules (e.g., python) critical for loading and working with Spack. # This may have unwanted/unexpected behavior on some systems, so use carefully. if [ "$1" == "-i" ]; then echo "Resetting PATH to system defaults" PATH=$(env -u PATH -u PROFILEREAD bash -c 'echo $PATH') + case "$(hostname -s)" in + Orion-login-[1-4]) module load python/3.7.5 + ;; + esac fi # https://stackoverflow.com/questions/59895/how-can-i-get-the-source-directory-of-a-bash-script-from-within-the-script-itsel