diff options
author | Erich Eckner <git@eckner.net> | 2018-09-28 11:31:24 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-09-28 11:31:24 +0200 |
commit | 6cc265f6ddbbb4f288fdfeae6933a1873e1e58ad (patch) | |
tree | 8cbf67da00c3135debf0cb2bcb8502d749ca979a /bin | |
parent | 9b7f27cfc6405f753c66809c5b1bdb70b396a089 (diff) | |
download | builder-6cc265f6ddbbb4f288fdfeae6933a1873e1e58ad.tar.xz |
bin/check-upstream-bug-tracker: repair IFS
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/check-upstream-bug-tracker | 18 |
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}" |