diff options
-rw-r--r-- | lib/control.sh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/control.sh b/lib/control.sh index bbca4d8..bf3e8fb 100644 --- a/lib/control.sh +++ b/lib/control.sh @@ -125,11 +125,10 @@ ob_parse_control() return 0 fi fi - name="${line%%:*}" - value="${line#*:}" - value="${value# }" - if [ -z "${name}" \ - -o "${name}" = "${line}" ]; then + IFS=': ' read name value <<-EOF + ${line} + EOF + if [ -z "${name}" ]; then # Badly formatted control field. _ob_parse_control_error "${file}" "${line_nr}" \ 'control_bad_nv' |