configure: make sh_quote() more robust
authorMåns Rullgård <mans@mansr.com>
Tue, 20 Jul 2010 22:02:16 +0000 (22:02 +0000)
committerMåns Rullgård <mans@mansr.com>
Tue, 20 Jul 2010 22:02:16 +0000 (22:02 +0000)
Originally committed as revision 24376 to svn://svn.ffmpeg.org/ffmpeg/trunk

configure

index 8980004..3035839 100755 (executable)
--- a/configure
+++ b/configure
@@ -304,7 +304,7 @@ c_escape(){
 
 sh_quote(){
     v=$(echo "$1" | sed "s/'/'\\\\''/g")
-    test "$v" = "${v#*[ |&;<>()$\`\\\"\'*?\[\]#~=%]}" || v="'$v'"
+    test "x$v" = "x${v#*[^A-Za-z0-9_/.+-]}" || v="'$v'"
     echo "$v"
 }