diff options
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/autogen.sh b/autogen.sh index f646dab0c1d0..a4135da723eb 100755 --- a/autogen.sh +++ b/autogen.sh @@ -11,23 +11,27 @@ fi requote() { - local q=\' - set -- "${@//\'/$q\'$q}" # quote inner instances of ' - set -- "${@/#/$q}" # add ' to start of each param - set -- "${@/%/$q}" # add ' to end of each param - echo "$*" # ' in a comment to stop confusing vim + out="" + for param in "$@" ; do + p=`echo "$param" | sed "s/'/'\\\\\\''/g"` + if test -z "$out" ; then + out="'$p'" + else + out="$out '$p'" + fi + done + echo "$out" } distro() { name='' - while test "$#" -gt 0 ; do - case "$1" in - --with-distro=*) name=${1#--with-distro=} ;; + for param in "$@" ; do + case "$param" in + --with-distro=*) name=${param#--with-distro=} ;; esac - shift done - echo $name + echo "$name" } old_args="" |