summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/feed.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/feed.sh b/lib/feed.sh
index 3805bf0..feaf7ba 100644
--- a/lib/feed.sh
+++ b/lib/feed.sh
@@ -122,9 +122,11 @@ feed_para_cb()
dep="${dep%%(*}"
dep="${dep%%|*}"
# Trim whitespace.
- # XXX: This doesn't actually trim multiple spaces.
- dep="${dep##[ ${HT}${LF}]}"
- dep="${dep%%[ ${HT}${LF}]}"
+ dep="$(printf '%s\n' "${dep}" | sed 's/^ *//; s/ *$//')"
+ # In practice, this would suffice for control files generated by
+ # opkbuild:
+ # dep="${dep#[ ${HT}${LF}]}"
+ # dep="${dep%[ ${HT}${LF}]}"
new_deps="${new_deps} ${dep}"
done
unset IFS