diff --git a/lib/libem.bash b/lib/libem.bash index eea639c..4c54c1f 100644 --- a/lib/libem.bash +++ b/lib/libem.bash @@ -388,12 +388,10 @@ function _cleanup_build() { function em.cleanup_src() { ( [[ -d /${EM_SRCDIR} ]] || return 0 - cd "/${EM_SRCDIR}"; + cd "/${EM_SRCDIR}/.."; if [[ $(pwd) != / ]]; then echo "Cleaning up $(pwd)" - rm -rf * - cd .. - rmdir "/${EM_SRCDIR}" + rm -rf ${EM_SRCDIR##*/} fi ); }