From 8429368d22e3dc046b1ec0311c292e0e70ee1a9d Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Sun, 13 Feb 2011 13:06:53 +0000 Subject: [PATCH] configure: add cleanws() function This function removes leading and trailing spaces and collapses multiple spaces into one. Signed-off-by: Mans Rullgard (cherry picked from commit bb7a22b5840e56c034227ad596b1165c03f2da27) --- configure | 4 ++++ 1 file changed, 4 insertions(+) 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