]> wimlib.net Git - wimlib/blobdiff - make-windows-release
make-windows-release: Allow multiple extra args to configure
[wimlib] / make-windows-release
index 317d0a8835ffcb351120f8b39d1feed367bce658..298b37cb9c94605e31cc04684830693286eac47d 100755 (executable)
@@ -1,16 +1,11 @@
 #!/bin/bash
 
 #!/bin/bash
 
-set -e -u
+set -e
 
 WIMLIB_ARCH=i686
 if [ $# -ge 1 ]; then
        WIMLIB_ARCH=$1
 
 WIMLIB_ARCH=i686
 if [ $# -ge 1 ]; then
        WIMLIB_ARCH=$1
-fi
-
-if [ $# -ge 2 ]; then
-       CONF_EXTRA_ARGS="$2"
-else
-       CONF_EXTRA_ARGS=
+       shift
 fi
 
 if [[ $WIMLIB_ARCH = i686 ]] ; then
 fi
 
 if [[ $WIMLIB_ARCH = i686 ]] ; then
@@ -22,12 +17,14 @@ else
        exit 2
 fi
 
        exit 2
 fi
 
+CONF_EXTRA_ARGS=("$@")
+
 VERSION=$(grep 'This is wimlib version' README | \
          grep -o '\<[0-9]\+\.[0-9]\+\.[0-9]\+\(-BETA\)\?\>')
 ZIPFILE=wimlib-${VERSION}-windows-${WIMLIB_ARCH}-bin.zip
 
 if ! grep -q "./configure --host=${WIMLIB_ARCH}-w64-mingw32" config.log; then
 VERSION=$(grep 'This is wimlib version' README | \
          grep -o '\<[0-9]\+\.[0-9]\+\.[0-9]\+\(-BETA\)\?\>')
 ZIPFILE=wimlib-${VERSION}-windows-${WIMLIB_ARCH}-bin.zip
 
 if ! grep -q "./configure --host=${WIMLIB_ARCH}-w64-mingw32" config.log; then
-       ./configure --host=${WIMLIB_ARCH}-w64-mingw32 $CONF_EXTRA_ARGS
+       ./configure --host=${WIMLIB_ARCH}-w64-mingw32 "${CONF_EXTRA_ARGS[@]}"
        make clean
 fi
 
        make clean
 fi