diff options
author | Mans Rullgard <mans@mansr.com> | 2011-02-13 16:06:53 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-02-15 01:58:19 +0300 |
commit | 8429368d22e3dc046b1ec0311c292e0e70ee1a9d (patch) | |
tree | 49c8fbd462c3da29cd37bbe34f979333f2444f76 | |
parent | 11ab1e409ff272c8c0bce62f48a3767546547c6c (diff) |
configure: add cleanws() function
This function removes leading and trailing spaces and collapses
multiple spaces into one.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit bb7a22b5840e56c034227ad596b1165c03f2da27)
-rwxr-xr-x | configure | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -313,6 +313,10 @@ sh_quote(){ echo "$v" } +cleanws(){ + echo "$@" | sed 's/^ *//;s/ */ /g;s/ *$//' +} + filter(){ pat=$1 shift |