From 426210589120997b4bf991636ea5a16acbb964ae Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 19 Feb 2018 08:58:35 +0100 Subject: bin/build-packages: remove old, residual tmpdirs --- bin/build-packages | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- cgit v1.2.3-70-g09d2