summaryrefslogtreecommitdiff
path: root/bin/get-assignment
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-11-25 18:49:44 +0100
committerErich Eckner <git@eckner.net>2017-11-25 18:49:44 +0100
commit3d73461f75988701413e7f3d713117482c9d3bbb (patch)
tree8e586368ef89e67c6934a21bad9c3321c270b8e3 /bin/get-assignment
parente2511c2fa5ee7ad726d3348c8dc351ad561fd574 (diff)
downloadbuilder-3d73461f75988701413e7f3d713117482c9d3bbb.tar.xz
bin/get-assignment: do not cat locked file for appending slave if not existent
Diffstat (limited to 'bin/get-assignment')
-rwxr-xr-xbin/get-assignment4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/get-assignment b/bin/get-assignment
index f755204..82463a8 100755
--- a/bin/get-assignment
+++ b/bin/get-assignment
@@ -44,7 +44,9 @@ hand_out_assignment() {
{
# shellcheck disable=SC2154
echo "${slave}"
- cat "${work_dir}/package-states/$1.$2.$3.$4.locked"
+ if [ -r "${work_dir}/package-states/$1.$2.$3.$4.locked" ]; then
+ cat "${work_dir}/package-states/$1.$2.$3.$4.locked"
+ fi
} | \
sort -u | \
sponge "${work_dir}/package-states/$1.$2.$3.$4.locked"