Browse code

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)

Mans Rullgard authored on 2011/02/13 22:06:53
Showing 1 changed files
... ...
@@ -313,6 +313,10 @@ sh_quote(){
313 313
     echo "$v"
314 314
 }
315 315
 
316
+cleanws(){
317
+    echo "$@" | sed 's/^ *//;s/  */ /g;s/ *$//'
318
+}
319
+
316 320
 filter(){
317 321
     pat=$1
318 322
     shift