Commit b6021f80 authored by gsell's avatar gsell
Browse files

lib/libem.bash: bugfix in 'em.cleanup_build()'

parent dfcb0d10
...@@ -584,14 +584,14 @@ function _set_link() { ...@@ -584,14 +584,14 @@ function _set_link() {
} }
function em.cleanup_build() { function em.cleanup_build() {
( [[ -n "${MODULE_BUILDDIR}" ]] \
[[ -d /${MODULE_BUILDDIR} ]] || return 0 || die 1 "Oops: internal error: MODULE_BUILDDIR is set to empty string..."
cd "/${MODULE_BUILDDIR}/.."; [[ "${MODULE_BUILDDIR}" == "/" ]] \
if [[ $(pwd) != / ]]; then && die 1 "Oops: internal error: MODULE_BUILDDIR is set to '/'..."
echo "Cleaning up $(pwd)/${COMPILER_VERSION}" [[ -d "/${MODULE_BUILDDIR}" ]] \
rm -rf * || die 1 "Oops: internal error: MODULE_BUILDDIR=${MODULE_BUILDDIR} is not a directory..."
fi echo "Cleaning up '/${MODULE_BUILDDIR}'..."
); rm -rf "/${MODULE_BUILDDIR}"
} }
function em.cleanup_src() { function em.cleanup_src() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment