Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/build-packages
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-02-19 08:58:35 +0100
committerErich Eckner <git@eckner.net>2018-02-19 08:58:35 +0100
commit426210589120997b4bf991636ea5a16acbb964ae (patch)
treeae32bc3b793ad21b4982b7b5ff172822f98df476 /bin/build-packages
parentfab8768bd2723425ed34256ff7b7a08eeb0bd373 (diff)
bin/build-packages: remove old, residual tmpdirs
Diffstat (limited to 'bin/build-packages')
-rwxr-xr-xbin/build-packages10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/build-packages b/bin/build-packages
index b6c4a7a..b99036f 100755
--- a/bin/build-packages
+++ b/bin/build-packages
@@ -222,6 +222,11 @@ while [ "${count}" -ne 0 ]; do
if [ "${mod_git_revision}" = 'work-tree' ]; then
mod_git_revision=$(
# we can't just create an empty index-file with mktemp, because git doesn't like it
+ find . \
+ -mindepth 1 \
+ -maxdepth 1 \
+ -name 'tmp.build-packages.git.*' \
+ -exec rm -rf --one-file-system {} \;
tmp_subdir=$(mktemp -d 'tmp.build-packages.git.XXXXXXXXXX' --tmpdir)
trap 'rm -rf --one-file-system "${tmp_subdir}"' EXIT
export GIT_INDEX_FILE="${tmp_subdir}/index.new"
@@ -255,6 +260,11 @@ while [ "${count}" -ne 0 ]; do
recursively_umount_and_rm "${tmp_dir}"
exit "${err}"
}
+ find . \
+ -mindepth 1 \
+ -maxdepth 1 \
+ -name 'tmp.build-packages.??????' \
+ -exec rm -rf --one-file-system {} \;
tmp_dir=$(mktemp -d "${work_dir}/tmp.build-packages.XXXXXX")
trap bail_out EXIT