summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2011-02-13 13:06:53 +0000
committerMichael Niedermayer <michaelni@gmx.at>2011-02-14 23:58:19 +0100
commit8429368d22e3dc046b1ec0311c292e0e70ee1a9d (patch)
tree49c8fbd462c3da29cd37bbe34f979333f2444f76 /configure
parent11ab1e409ff272c8c0bce62f48a3767546547c6c (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)
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure b/configure
index 8a32709cf6..238bf0142b 100755
--- a/configure
+++ b/configure
@@ -313,6 +313,10 @@ sh_quote(){
echo "$v"
}
+cleanws(){
+ echo "$@" | sed 's/^ *//;s/ */ /g;s/ *$//'
+}
+
filter(){
pat=$1
shift