From ddf9028ac7a32f5ac54099e341b059b62da46915 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sat, 05 Jan 2019 09:42:12 -0500 Subject: ob_parse_control(): Replace param prefix/suffix removals with read --- 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' -- cgit v0.9.1