From 7c6f2c010fa1b1d2c5f0c416c45294ff36d96d24 Mon Sep 17 00:00:00 2001 From: Lucio Andrés Illanes Albornoz (arab, vxp) Date: Mar 05 2016 16:10:42 +0000 Subject: Fixes clean_build_status() and clean_prefix(). --- diff --git a/build.subr b/build.subr index 46ee83e..57e2e3a 100644 --- a/build.subr +++ b/build.subr @@ -36,14 +36,16 @@ clean_prefix() { log_msg info "-c specified, cleaning prefix..."; set -- bin include lib lib64 libexec native share x86_64-nt64-midipix; while [ ${#} -gt 0 ]; do rm -rf ${PREFIX}/${1}; shift; done; - find ${PREFIX}/tmp -mindepth 1 -maxdepth 1 -not -iname \*.tar\* -exec rm -rf {} \; - find ${PREFIX}/tmp -mindepth 1 -maxdepth 1 -type f -iname .\* -exec rm -rf {} \; + for _cp_pname in $(find ${PREFIX}/tmp -mindepth 1 -maxdepth 1 -not -iname \*.tar\*) \ + $(find ${PREFIX}/tmp -mindepth 1 -maxdepth 1 -type f -iname .\*); do + rm_if_exists ${_cp_pname}; + done; }; clean_build_status() { set -- BUILD_STATUS_IN_PROGRESS_FNAME BUILD_STATUS_PROGRESS_FNAME BUILD_STATUS_TARBALL_PROGRESS_FNAME; while [ ${#} -gt 0 ]; do - unset ${1}; shift; + rm -f ${1}; shift; done; touch ${PREFIX}/BUILD_ABORTED_AT_$(date %Y-%m-%d-%H-%M-%S); log_msg fail "Build aborted at $(date %Y-%m-%d-%H-%M-%S)."; };