lib/libem.bash: bugfix in building dependencies; remove source directory in em.cleanup_src()
This commit is contained in:
+6
-2
@@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
declare -rx ARGS="$@"
|
||||||
|
|
||||||
declare -rx SHLIBDIR=$( cd $(dirname "$BASH_SOURCE") && pwd )
|
declare -rx SHLIBDIR=$( cd $(dirname "$BASH_SOURCE") && pwd )
|
||||||
|
|
||||||
declare -r OS=$(uname -s)
|
declare -r OS=$(uname -s)
|
||||||
@@ -184,8 +186,8 @@ function _load_build_dependencies() {
|
|||||||
fi
|
fi
|
||||||
if module load "$m" 2>&1 | grep -q "Unable to locate"; then
|
if module load "$m" 2>&1 | grep -q "Unable to locate"; then
|
||||||
echo "Module \"$m\" not available, trying to build it..."
|
echo "Module \"$m\" not available, trying to build it..."
|
||||||
"${SCRIPTDIR}/${m/\/*}"
|
"${SCRIPTDIR}/${m/\/*}.build" ${ARGS[@]}
|
||||||
if -z $(module avail "$m" 2>&1); then
|
if [[ -z $(module avail "$m" 2>&1) ]]; then
|
||||||
echo "Oops: Building module \"$m\" failed..."
|
echo "Oops: Building module \"$m\" failed..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -390,6 +392,8 @@ function em.cleanup_src() {
|
|||||||
if [[ $(pwd) != / ]]; then
|
if [[ $(pwd) != / ]]; then
|
||||||
echo "Cleaning up $(pwd)"
|
echo "Cleaning up $(pwd)"
|
||||||
rm -rf *
|
rm -rf *
|
||||||
|
cd ..
|
||||||
|
rmdir "/${EM_SRCDIR}"
|
||||||
fi
|
fi
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user