Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-06-08 08:52:41 +0200
committerErich Eckner <git@eckner.net>2017-06-08 08:52:41 +0200
commit8bc44560983956a18f5c5e4b896f291378a063d1 (patch)
tree2cb66262624a305a4113d73cd36ac7d12b24f7c1
parent9e4ce68f5479ec266ab814b7ab7f379808bd2406 (diff)
bin/get-assignment: clean up
-rwxr-xr-xbin/get-assignment55
1 files changed, 23 insertions, 32 deletions
diff --git a/bin/get-assignment b/bin/get-assignment
index 3d8fef4..42446bc 100755
--- a/bin/get-assignment
+++ b/bin/get-assignment
@@ -120,38 +120,29 @@ locked_packages="$(
sed 's|\(\.[0-9a-f]\{40\}\)\{2\}\.[^\.\]\+\.locked$||'
)"
-unlocked_loops="$(
- ls "${work_dir}/build-list.loops/" | \
- grep '^loop_[0-9]\+$' | \
- while read -r loop; do
- if [ -z "$(
- (
- cat "${work_dir}/build-list.loops/${loop}"
- echo "${locked_packages}"
- ) | \
- sort | \
- uniq -d
- )" ]; then
- echo "${loop}"
- fi
- done
-)"
-
-for package in $(
- echo "${unlocked_loops}" | \
- sed "s|^|${work_dir}/build-list.loops/|" | \
- xargs cat | \
- sort | \
- uniq -c | \
- sort -k1nr,1 | \
- awk '{print $2}'
- ); do
-
- if assignment="$(grep "^${package//./\\.} " "${work_dir}/build-list")"; then
- hand_out_assignment ${assignment}
- fi
-
-done
+ls "${work_dir}/build-list.loops/" | \
+ grep '^loop_[0-9]\+$' | \
+ while read -r loop; do
+ if [ -z "$(
+ (
+ cat "${work_dir}/build-list.loops/${loop}"
+ echo "${locked_packages}"
+ ) | \
+ sort | \
+ uniq -d
+ )" ]; then
+ cat "${work_dir}/build-list.loops/${loop}"
+ fi
+ done | \
+ sort | \
+ uniq -c | \
+ sort -k1nr,1 | \
+ awk '{print $2}' | \
+ while read -r package; do
+ if assignment="$(grep "^${package//./\\.} " "${work_dir}/build-list")"; then
+ hand_out_assignment ${assignment}
+ fi
+ done
# Remove the lock file