[FFmpeg-devel] [PATCH 1/2] configure: add cleanws() function

Mans Rullgard mans
Sun Feb 13 14:17:58 CET 2011


This function removes leading and trailing spaces and collapses
multiple spaces into one.

Signed-off-by: Mans Rullgard <mans at mansr.com>
---
 configure |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index a310d25..01b092f 100755
--- a/configure
+++ b/configure
@@ -313,6 +313,10 @@ sh_quote(){
     echo "$v"
 }
 
+cleanws(){
+    echo "$@" | sed 's/^ *//;s/  */ /g;s/ *$//'
+}
+
 filter(){
     pat=$1
     shift
-- 
1.7.4




More information about the ffmpeg-devel mailing list