From ac74d2d7bd67f31f1e7b98403af5fc0b24c3bc91 Mon Sep 17 00:00:00 2001 From: "Br. Samuel Springuel" Date: Fri, 13 May 2016 14:11:49 -0400 Subject: [PATCH] Make use of `elif` instead of nested conditionals --- build.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/build.sh b/build.sh index 9d00ea2e4..da98af69d 100755 --- a/build.sh +++ b/build.sh @@ -69,14 +69,10 @@ then MINGWSTR=mingw32 if [ -d /usr/mingw32 ]; then MINGWSTR=mingw32 - else - if [ -d /usr/i386-mingw32msvc ]; then + elif [ -d /usr/i386-mingw32msvc ]; then MINGWSTR=i386-mingw32msvc - else - if [ -d /usr/i586-mingw32msvc ]; then + elif [ -d /usr/i586-mingw32msvc ]; then MINGWSTR=i586-mingw32msvc - fi - fi fi OLDPATH=$PATH PATH=/usr/$MINGWSTR/bin:$PATH @@ -87,8 +83,7 @@ then --host=$MINGWSTR \ --build=$MINGWBUILD \ --prefix=/usr/$MINGWSTR" -else -if [ "$MACCROSS" = "TRUE" ] +elif [ "$MACCROSS" = "TRUE" ] then # make sure that architecture parameter is valid case $ARCH in @@ -98,7 +93,6 @@ then ARCHFLAGS="$ARCHFLAGS" CFLAGS="-arch $ARCH -g -O2 $CFLAGS" LDFLAGS="-arch $ARCH $LDFLAGS" -fi fi