runtests.sh: fix arguments pass-through
authorZac Medico <zmedico@gentoo.org>
Tue, 25 Oct 2011 19:52:40 +0000 (12:52 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 25 Oct 2011 19:52:40 +0000 (12:52 -0700)
runtests.sh

index 31bbaf834ee0402f3a9b1b0def602fa9cdd16a6f..b7313b79b91197b9f77c7951a9f6cbf3f792e3d5 100755 (executable)
@@ -27,6 +27,8 @@ interrupted() {
 
 trap interrupted SIGINT
 
+unused_args=()
+
 while [[ -n $1 ]] ; do
        case "$1" in
                --python-versions=*)
@@ -36,10 +38,15 @@ while [[ -n $1 ]] ; do
                        shift
                        PYTHON_VERSIONS=$1
                        ;;
+               *)
+                       unused_args[${#unused_args[@]}]=$1
+                       ;;
        esac
        shift
 done
 
+set -- "${unused_args[@]}"
+
 exit_status="0"
 for version in ${PYTHON_VERSIONS}; do
        if [[ -x /usr/bin/python${version} ]]; then