Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/check-upstream-bug-tracker
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-09-28 11:31:24 +0200
committerErich Eckner <git@eckner.net>2018-09-28 11:31:24 +0200
commit6cc265f6ddbbb4f288fdfeae6933a1873e1e58ad (patch)
tree8cbf67da00c3135debf0cb2bcb8502d749ca979a /bin/check-upstream-bug-tracker
parent9b7f27cfc6405f753c66809c5b1bdb70b396a089 (diff)
bin/check-upstream-bug-tracker: repair IFS
Diffstat (limited to 'bin/check-upstream-bug-tracker')
-rwxr-xr-xbin/check-upstream-bug-tracker18
1 files changed, 14 insertions, 4 deletions
diff --git a/bin/check-upstream-bug-tracker b/bin/check-upstream-bug-tracker
index c6be40a..71754d0 100755
--- a/bin/check-upstream-bug-tracker
+++ b/bin/check-upstream-bug-tracker
@@ -50,17 +50,27 @@ while [ -s "${tmp_dir}/broken-packages" ]; do
)
fs_ids=''
OIFS="${IFS}"
- IFS=$(printf '\n')
+ lines=$(
+ grep "^$(str_to_regex "${identifier}")\\s" "${tmp_dir}/broken-packages" | \
+ cut -f2,3 | \
+ tr '\t\n' '\n\t'
+ )
+ IFS=$(printf '\t')
# shellcheck disable=SC2013
- for line in $(grep "^$(str_to_regex "${identifier}")\\s" "${tmp_dir}/broken-packages" | cut -f2,3); do
+ for line in ${lines}; do
IFS="${OIFS}"
printf '> '
- printf '%s\n' "${line}" | \
+ printf '%s' "${line}" | \
+ tr '\t\n' '\n\t' | \
cut -f2
printf 'Should we wait (empty = "yes")? '
read -r w
if [ -z "${w}" ]; then
- fs_ids="${fs_ids},FS#$(printf '%s\n' "${line}" | cut -f1)"
+ fs_ids="${fs_ids},FS#$(
+ printf '%s\n' "${line}" | \
+ tr '\t\n' '\n\t' | \
+ cut -f1
+ )"
fi
done
IFS="${OIFS}"