Skip to content
Snippets Groups Projects
Commit bd251246 authored by Easy Build's avatar Easy Build
Browse files

fix

parent b8c17b84
No related branches found
No related tags found
No related merge requests found
Pipeline #5858 failed
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
DIRNAME="/home/easybuild/EasyBuild-wrappers" DIRNAME="/home/easybuild/EasyBuild-wrappers"
SCRIPTS_DIR="$DIRNAME/scripts" SCRIPTS_DIR="$DIRNAME/scripts"
LMOD=$(echo $LMOD_VERSION) LMOD=$(echo "$LMOD_VERSION")
if [ -z "$LMOD" ]; then if [ -z "$LMOD" ]; then
echo "LMOD version not defined" echo "LMOD version not defined"
exit 1 exit 1
...@@ -25,61 +25,61 @@ if [ -z "$EB" ]; then ...@@ -25,61 +25,61 @@ if [ -z "$EB" ]; then
exit 1 exit 1
fi fi
NAME=$(echo $CLUSTERNAME) NAME=$(echo "$CLUSTERNAME")
if [ -z "$NAME" ]; then if [ -z "$NAME" ]; then
echo "CLUSTERNAME not defined" echo "CLUSTERNAME not defined"
exit 1 exit 1
fi fi
if [[ ! -z `echo $@ | grep "\-\-rm-module"` ]]; then if [[ ! -z `echo "$@" | grep "\-\-rm-module"` ]]; then
MODULE=$(echo $@ | sed "s|\-\-rm-module||") MODULE=$(echo "$@" | sed "s|\-\-rm-module||")
$SCRIPTS_DIR/rm-module.sh $MODULE "$SCRIPTS_DIR/rm-module.sh" "$MODULE"
exit 0 exit 0
fi fi
if [[ ! -z `echo $@ | grep "\-\-find-dependency"` ]]; then if [[ ! -z `echo $@ | grep "\-\-find-dependency"` ]]; then
MODULE=$(echo $@ | sed "s|\-\-find-dependency||") MODULE=$(echo $@ | sed "s|\-\-find-dependency||")
$SCRIPTS_DIR/find-dependency.sh $MODULE "$SCRIPTS_DIR/find-dependency.sh" "$MODULE"
exit 0 exit 0
fi fi
if [[ ! -z `echo $@ | grep "\-\-cache"` ]] && [[ ! $NAME == "UV2000" ]]; then if [[ ! -z `echo $@ | grep "\-\-cache"` ]] && [[ ! $NAME == "UV2000" ]]; then
echo "== Update lmod system cache files" echo "== Update lmod system cache files"
$LMOD_DIR/update_lmod_system_cache_files $MODULEPATH "$LMOD_DIR/update_lmod_system_cache_files" "$MODULEPATH"
exit 0 exit 0
fi fi
if [[ ! -z `echo $@ | grep "install-latest-eb-release"` ]]; then if [[ ! -z `echo $@ | grep "install-latest-eb-release"` ]]; then
$DIRNAME/eb.exe --install-latest-eb-release && $SCRIPTS_DIR/post_install.s eb.exe --install-latest-eb-release && "$SCRIPTS_DIR/post_install.sh"
exit 0 exit 0
fi fi
if [[ ! -z `echo $@ | grep "containerize"` ]]; then if [[ ! -z `echo $@ | grep "containerize"` ]]; then
ml Singularity/$SING ml Singularity/"$SING"
echo "== Load Singularity/$SING" echo "== Load Singularity/$SING"
fi fi
mm_message="##### $NAME ($EB) - $WHO ... BUILD mm_message="##### $NAME ($EB) - $WHO ... BUILD
eb $@" eb $@"
DRYRUN=$(echo $@ | grep "\-D") DRYRUN=$(echo "$@" | grep "\-D")
HELP=$(echo $@ | grep "\-h") HELP=$(echo "$@" | grep "\-h")
SEARCH=$(echo $@ | grep "\-S") SEARCH=$(echo "$@" | grep "\-S")
if [ "$WHO" == 'easybuild' ] && [[ -z $DRYRUN ]] && [[ -z $SEARCH ]]; then if [ "$WHO" == 'easybuild' ] && [[ -z "$DRYRUN" ]] && [[ -z "$SEARCH" ]]; then
curl -s -i -X POST -d 'payload={"text": "'"$mm_message"'"}' http://mm.it4i.cz/hooks/mxskhwmjxjyq8ghgyuyfo6wwqw > /dev/null curl -s -i -X POST -d 'payload={"text": "'"$mm_message"'"}' http://mm.it4i.cz/hooks/mxskhwmjxjyq8ghgyuyfo6wwqw > /dev/null
elif [[ -z $DRYRUN ]]; then elif [[ -z $DRYRUN ]]; then
curl -s -i -X POST -d 'payload={"text": "'"$mm_message"'"}' http://mm.it4i.cz/hooks/7h511fiphpfedx9pkqfhx1h59h > /dev/null curl -s -i -X POST -d 'payload={"text": "'"$mm_message"'"}' http://mm.it4i.cz/hooks/7h511fiphpfedx9pkqfhx1h59h > /dev/null
fi fi
eb.exe $@ eb.exe "$@"
RESULT=$? RESULT=$?
date=`date +"%m-%d-%y %T"` date=`date +"%m-%d-%y %T"`
res="false" res="false"
if [ $RESULT -eq 0 ]; then if [ "$RESULT" -eq 0 ]; then
mm_message="##### $NAME - $WHO ... SUCCESS mm_message="##### $NAME - $WHO ... SUCCESS
eb $@" eb $@"
res="true" res="true"
...@@ -89,18 +89,18 @@ eb $@" ...@@ -89,18 +89,18 @@ eb $@"
res="false" res="false"
fi fi
if [ "$WHO" == 'easybuild' ] && [[ -z $DRYRUN ]]; then if [ "$WHO" == 'easybuild' ] && [[ -z "$DRYRUN" ]]; then
curl -s -i -X POST -d 'payload={"text": "'"$mm_message"'"}' http://mm.it4i.cz/hooks/mxskhwmjxjyq8ghgyuyfo6wwqw > /dev/null curl -s -i -X POST -d 'payload={"text": "'"$mm_message"'"}' http://mm.it4i.cz/hooks/mxskhwmjxjyq8ghgyuyfo6wwqw > /dev/null
if [ ! $res == "false" ] && [[ -z $HELP ]] && [[ ! $NAME == "UV2000" ]] && [[ -z $SEARCH ]]; then if [ ! "$res" == "false" ] && [[ -z "$HELP" ]] && [[ ! "$NAME" == "UV2000" ]] && [[ -z "$SEARCH" ]]; then
echo "== Update lmod system cache files" echo "== Update lmod system cache files"
$LMOD_DIR/update_lmod_system_cache_files $MODULEPATH "$LMOD_DIR/update_lmod_system_cache_files" "$MODULEPATH"
fi fi
elif [[ -z $DRYRUN ]]; then elif [[ -z "$DRYRUN" ]]; then
curl -s -i -X POST -d 'payload={"text": "'"$mm_message"'"}' http://mm.it4i.cz/hooks/7h511fiphpfedx9pkqfhx1h59h > /dev/null curl -s -i -X POST -d 'payload={"text": "'"$mm_message"'"}' http://mm.it4i.cz/hooks/7h511fiphpfedx9pkqfhx1h59h > /dev/null
fi fi
SINGULARITY=$(ml -t 2>&1 | grep Singularity) SINGULARITY=$(ml -t 2>&1 | grep Singularity)
if [ ! $SINGULARITY == "" ]; then if [ ! "$SINGULARITY" == "" ]; then
ml -Singularity ml -Singularity
echo "== Unload Singularity" echo "== Unload Singularity"
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment