From 7c6f2c010fa1b1d2c5f0c416c45294ff36d96d24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Sat, 5 Mar 2016 17:10:42 +0100 Subject: Fixes clean_build_status() and clean_prefix(). --- build.subr | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/build.subr b/build.subr index 46ee83ea..57e2e3ac 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)."; }; -- cgit v1.2.3