From c7f7b737c8ff36901a5f7f7eee2f04b516c58cc8 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Fri, 12 Jul 2013 10:10:23 +0000 Subject: [PATCH] [CONFIGURE.SH] Kill bashisms introduced by r59197 and replace them by sh code. This is mainly to preserve maximum portability of the code, and to fix configure.sh on platforms where /bin/sh doesn't point to /bin/sh ;-). svn path=/trunk/; revision=59457 --- reactos/configure.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/reactos/configure.sh b/reactos/configure.sh index b4f769aa0be..14a1015560e 100755 --- a/reactos/configure.sh +++ b/reactos/configure.sh @@ -16,19 +16,19 @@ exit 1 } CMAKE_GENERATOR="Ninja" -for (( i=1; i<=$#; i++ )); do - case ${!i} in +while [ $# -gt 0 ]; do + case $1 in -D) - ((i++)) - if [[ "x${!i}" == x?*=* ]] ; then - ROS_CMAKEOPTS+=" -D ${!i}" + shift + if echo "x$1" | grep 'x?*=*' > /dev/null; then + ROS_CMAKEOPTS+=" -D $1" else usage fi ;; - -D?*=*) - ROS_CMAKEOPTS+=" ${!i}" + -D?*=*|-D?*) + ROS_CMAKEOPTS+=" $1" ;; makefiles|Makefiles) CMAKE_GENERATOR="Unix Makefiles" @@ -36,6 +36,8 @@ for (( i=1; i<=$#; i++ )); do *) usage esac + + shift done if [ "$REACTOS_SOURCE_DIR" = "$PWD" ]; then