diff options
author | Jan Schmidt <jan@centricular.com> | 2016-09-10 00:28:13 +1000 |
---|---|---|
committer | Jan Schmidt <jan@centricular.com> | 2016-09-10 09:52:38 +1000 |
commit | b18d820635185eb549530af1ce406937141b2dd9 (patch) | |
tree | 20176c00975a2e017f3bc3c843eaa28d1a5d1686 | |
parent | 2c316907f68608ab94b952bcf6f18b68668dd53c (diff) |
gst-autogen.sh: Handle multiword arguments better
Preserve multiword arguments that are to be passed
to configure, and quote them in the generated
autoregen.sh
-rwxr-xr-x | autogen.sh.in | 2 | ||||
-rw-r--r-- | gst-autogen.sh | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/autogen.sh.in b/autogen.sh.in index 170ac15..6300e56 100755 --- a/autogen.sh.in +++ b/autogen.sh.in @@ -49,7 +49,7 @@ elif test "x$package" = "xgst-plugins-bad"; then CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-player-tests" fi -autogen_options $@ +autogen_options "$@" printf "+ check for build tools" if test -z "$NOCHECK"; then diff --git a/gst-autogen.sh b/gst-autogen.sh index 71049e6..6feb9f2 100644 --- a/gst-autogen.sh +++ b/gst-autogen.sh @@ -6,7 +6,11 @@ if [ -f "autoregen.sh" ]; then rm autoregen.sh fi echo "#!/bin/sh" > autoregen.sh -echo "./autogen.sh $@ \$@" >> autoregen.sh +echo -n "./autogen.sh " >> autoregen.sh +for v in "$@"; do + echo -n "\"$v\" " >> autoregen.sh +done +echo "\$@" >> autoregen.sh chmod +x autoregen.sh # helper functions for autogen.sh @@ -77,13 +81,13 @@ autogen_options () --) shift ; break ;; *) echo "+ passing argument $1 to configure" - CONFIGURE_EXT_OPT="$CONFIGURE_EXT_OPT $1" + CONFIGURE_EXT_OPT=("$CONFIGURE_EXT_OPT" "$1") shift ;; esac done - for arg do CONFIGURE_EXT_OPT="$CONFIGURE_EXT_OPT $arg"; done + for arg do CONFIGURE_EXT_OPT=("$CONFIGURE_EXT_OPT" "$arg"); done if test ! -z "$CONFIGURE_EXT_OPT" then echo "+ options passed to configure: $CONFIGURE_EXT_OPT" |