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-07-04 11:55:18 +0200
committerErich Eckner <git@eckner.net>2017-07-04 11:55:18 +0200
commit7238c1d5b6c23e3227ebf4e10ba99eff46775fe9 (patch)
tree016b5e3855eb4a1e361546543c167696e4dfbc6b /bin/get-assignment
parent4d83e12fdcea0957cdaecf766d33186d62b9e9ed (diff)
bin/get-assignment, bin/get-package-updates: adding "break_loops" order enhanced and extracted to a function
Diffstat (limited to 'bin/get-assignment')
-rwxr-xr-xbin/get-assignment17
1 files changed, 12 insertions, 5 deletions
diff --git a/bin/get-assignment b/bin/get-assignment
index 2ef8556..64f6046 100755
--- a/bin/get-assignment
+++ b/bin/get-assignment
@@ -115,11 +115,18 @@ for hand_out_broken in false true; do
if [ -z "${git_revision}${mod_git_revision}${repository}" ] && \
[ "${package}" = 'break_loops' ]; then
if ${hand_out_broken}; then
- sed -i \
- '/^break_loops$/d' \
- "${work_dir}/build-list"
- echo 'break_loops' >> \
- "${work_dir}/build-list"
+ first=true
+ while read -r s; do
+ if [ "${s}" = 'break_loops' ] && \
+ ${first}; then
+ first=false
+ continue
+ fi
+ printf '%s\n' "${s}"
+ done < \
+ "${work_dir}/build-list" | \
+ sponge "${work_dir}/build-list"
+ insert_break_loops_orders "${work_dir}/build-list"
break
else
continue