Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/get-assignment
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-10-24 12:15:26 +0200
committerErich Eckner <git@eckner.net>2017-10-24 12:15:26 +0200
commit9af832676971cd9adb60378b1e7c876938fecc04 (patch)
tree7bc6ad6f91acc7e70d0f4cede8d75f7bd927a79f /bin/get-assignment
parent342b9e7ed96df0229c0217e421da9bcded7218d4 (diff)
bin/get-assignment: use tmp-dir for "build-list.sorted-by-package"
Diffstat (limited to 'bin/get-assignment')
-rwxr-xr-xbin/get-assignment6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/get-assignment b/bin/get-assignment
index 97bdb7b..be5c64e 100755
--- a/bin/get-assignment
+++ b/bin/get-assignment
@@ -66,8 +66,10 @@ fi
clean_up() {
rm -f "${build_list_lock_file}"
+ rm -rf --one-file-system "${tmp_dir}"
}
+tmp_dir=$(mktemp -d)
trap clean_up EXIT
# Check if there are any pending packages at all and if the requester
@@ -159,7 +161,7 @@ locked_packages=$(
grep -vxF 'break_loops' "${work_dir}/build-list" | \
sort -k1,1 > \
- "${work_dir}/build-list.sorted-by-package"
+ "${tmp_dir}/build-list.sorted-by-package"
for package in $(
# shellcheck disable=SC2030
@@ -181,7 +183,7 @@ for package in $(
uniq -c | \
join -1 2 -2 1 -o 1.1,2.1,2.2,2.3,2.4 \
- \
- "${work_dir}/build-list.sorted-by-package" | \
+ "${tmp_dir}/build-list.sorted-by-package" | \
while read -r count package git_revision git_mod_revision repository; do
if [ -f "${work_dir}/package-states/${package}.${git_revision}.${git_mod_revision}.${repository}.broken" ]; then
trials=$(