diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-04-23 17:12:13 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-04-23 17:12:13 (EDT) |
commit | 86ae9bb68973165682b7ee23743ab6c790cefbc2 (patch) | |
tree | 3d291ab19e5d7934ae3dae2132307c1aa41f622d | |
parent | 1b5f9fea85ca6fe0ba5786367e1da11bc4df808e (diff) |
ob_parse_control(): Replace param prefix/suffix removals with read
-rw-r--r-- | src/control.sh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/control.sh b/src/control.sh index 45600a6..2a7634d 100644 --- a/src/control.sh +++ b/src/control.sh @@ -100,11 +100,10 @@ parse_control() return 0 fi fi - name="${line%%:*}" - value="${line#*:}" - value="${value# }" - if [ "x${name}" = 'x' -o "x${name}" = \ - "x${line}" ]; then + IFS=': ' read name value <<-EOF + ${line} + EOF + if [ "x${name}" = 'x' ]; then _parse_control_error "${file}" \ "${line_nr}" 'control_bad_nv' continue |