summaryrefslogtreecommitdiffhomepage
path: root/build.subr
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-03-05 17:10:42 +0100
committerLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-03-05 17:10:42 +0100
commit7c6f2c010fa1b1d2c5f0c416c45294ff36d96d24 (patch)
tree32586fef710aef12fe25396bfb73872bdb3e8af1 /build.subr
parent5ddec7ff40328599568b89294a6dd5b2a5244a4c (diff)
downloadmidipix_build-7c6f2c010fa1b1d2c5f0c416c45294ff36d96d24.tar.bz2
midipix_build-7c6f2c010fa1b1d2c5f0c416c45294ff36d96d24.tar.xz
Fixes clean_build_status() and clean_prefix().
Diffstat (limited to 'build.subr')
-rw-r--r--build.subr8
1 files 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).";
};