Write more compact code.
This commit is contained in:
parent
bc516855ff
commit
0be4a91a0f
1 changed files with 11 additions and 16 deletions
11
sit
11
sit
|
@ -55,12 +55,12 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
case $PLATFORM in
|
|
||||||
hermit)
|
|
||||||
if [ "$COMPILER" == "system" ] ; then
|
if [ "$COMPILER" == "system" ] ; then
|
||||||
echo "Using system default compiler"
|
echo "Using system default compiler"
|
||||||
COMPILER="" # prevent any compiler specs in the prefix
|
COMPILER="" # prevent any compiler specs in the prefix
|
||||||
else
|
else
|
||||||
|
case $PLATFORM in
|
||||||
|
hermit)
|
||||||
module swap $(module list -l 2>&1 | awk '/^PrgEnv-/{print $1}') PrgEnv-${COMPILER}
|
module swap $(module list -l 2>&1 | awk '/^PrgEnv-/{print $1}') PrgEnv-${COMPILER}
|
||||||
if [ ! -z "$COMPILER_VERSION" ] ; then
|
if [ ! -z "$COMPILER_VERSION" ] ; then
|
||||||
if [ "${COMPILER}" == "gnu" ] ; then
|
if [ "${COMPILER}" == "gnu" ] ; then
|
||||||
|
@ -69,13 +69,8 @@ case $PLATFORM in
|
||||||
module swap $COMPILER $COMPILER/$COMPILER_VERSION
|
module swap $COMPILER $COMPILER/$COMPILER_VERSION
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
laki|*)
|
laki|*)
|
||||||
if [ "$COMPILER" == "system" ] ; then
|
|
||||||
echo "Using system default compiler"
|
|
||||||
COMPILER="" # prevent any compiler specs in the prefix
|
|
||||||
else
|
|
||||||
if [ -z "$COMPILER_VERSION" ] ; then
|
if [ -z "$COMPILER_VERSION" ] ; then
|
||||||
COMPILER_MODULE=compiler/${COMPILER}
|
COMPILER_MODULE=compiler/${COMPILER}
|
||||||
else
|
else
|
||||||
|
@ -83,9 +78,9 @@ case $PLATFORM in
|
||||||
fi
|
fi
|
||||||
echo "Loading compiler module ${COMPILER_MODULE}"
|
echo "Loading compiler module ${COMPILER_MODULE}"
|
||||||
module load ${COMPILER_MODULE}
|
module load ${COMPILER_MODULE}
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -z "${COMPILER}" ] ; then
|
if [ ! -z "${COMPILER}" ] ; then
|
||||||
# reevaluate compiler version
|
# reevaluate compiler version
|
||||||
|
|
Loading…
Reference in a new issue