From 69d98f307735d4bfcdac5638d0e04ed9762890da Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Mon, 17 Jul 2023 23:56:43 +0300 Subject: [PATCH 11/11] build_all_installers.sh: Improve env var quotation See osdn #48409 Signed-off-by: Marko Lindqvist --- .../installer_cross/build_all_installers.sh | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/windows/installer_cross/build_all_installers.sh b/windows/installer_cross/build_all_installers.sh index c6072baa0e..173f695b93 100755 --- a/windows/installer_cross/build_all_installers.sh +++ b/windows/installer_cross/build_all_installers.sh @@ -13,15 +13,15 @@ # #***********************************************************************/ -if test "x$1" = x || test "x$1" = "x-h" || test "x$1" = "x--help" ; then +if test "$1" = "" || test "$1" = "-h" || test "$1" = "--help" ; then USAGE_NEEDED=yes fi -if test "x$2" != "xsnapshot" && test "x$2" != "xrelease" ; then +if test "$2" != "snapshot" && test "$2" != "release" ; then USAGE_NEEDED=yes fi -if test "x$USAGE_NEEDED" = "xyes" ; then +if test "${USAGE_NEEDED}" = "yes" ; then echo "Usage: $0 " exit 1 fi @@ -29,52 +29,52 @@ fi DLLSPATH="$1" export INST_CROSS_MODE="$2" -if ! test -d "$DLLSPATH" ; then - echo "Dllstack directory \"$DLLSPATH\" not found!" >&2 +if ! test -d "${DLLSPATH}" ; then + echo "Dllstack directory \"${DLLSPATH}\" not found!" >&2 exit 1 fi -if ! test -f "$DLLSPATH/crosser.txt" ; then - echo "Directory \"$DLLSPATH\" does not look like crosser environment!" >&2 +if ! test -f "${DLLSPATH}/crosser.txt" ; then + echo "Directory \"${DLLSPATH}\" does not look like crosser environment!" >&2 exit 1 fi RET=0 -if grep "CROSSER_QT5" $DLLSPATH/crosser.txt | grep yes > /dev/null +if grep "CROSSER_QT5" "${DLLSPATH}/crosser.txt" | grep yes > /dev/null then CROSSER_QT5=yes fi -if grep "CROSSER_QT6" $DLLSPATH/crosser.txt | grep yes > /dev/null +if grep "CROSSER_QT6" "${DLLSPATH}/crosser.txt" | grep yes > /dev/null then CROSSER_QT6=yes fi -if grep "CROSSER_GTK4" $DLLSPATH/crosser.txt | grep yes > /dev/null +if grep "CROSSER_GTK4" "${DLLSPATH}/crosser.txt" | grep yes > /dev/null then CROSSER_GTK4=yes fi -if ! ./installer_build.sh $DLLSPATH gtk3.22 ; then +if ! ./installer_build.sh "${DLLSPATH}" gtk3.22 ; then RET=1 GTK322="Fail" else GTK322="Success" fi -if test "x$CROSSER_QT5" != "xyes" ; then +if test "${CROSSER_QT5}" != "yes" ; then QT5="N/A" -elif ! ./installer_build.sh $DLLSPATH qt5 ; then +elif ! ./installer_build.sh "${DLLSPATH}" qt5 ; then RET=1 QT5="Fail" else QT5="Success" fi -if test "x$CROSSER_QT6" != "xyes" ; then +if test "${CROSSER_QT6}" != "yes" ; then QT6="N/A" -elif ! ./installer_build.sh $DLLSPATH qt6 ; then +elif ! ./installer_build.sh "${DLLSPATH}" qt6 ; then RET=1 QT6="Fail" else @@ -82,38 +82,38 @@ else fi # sdl2-client comes with gtk4 modpack installer -if test "x$CROSSER_GTK4" != "xyes" ; then +if test "${CROSSER_GTK4}" != "yes" ; then SDL2="N/A" -elif ! ./installer_build.sh $DLLSPATH sdl2 ; then +elif ! ./installer_build.sh "${DLLSPATH}" sdl2 ; then RET=1 SDL2="Fail" else SDL2="Success" fi -if test "$CROSSER_GTK4" != "yes" ; then +if test "${CROSSER_GTK4}" != "yes" ; then GTK4="N/A" -elif ! ./installer_build.sh "$DLLSPATH" gtk4 ; then +elif ! ./installer_build.sh "${DLLSPATH}" gtk4 ; then RET=1 GTK4="Fail" else GTK4="Success" fi -if test "$CROSSER_QT6" != "yes" ; then +if test "${CROSSER_QT6}" != "yes" ; then RULEDIT="N/A" -elif ! ./installer_build.sh $DLLSPATH ruledit ; then +elif ! ./installer_build.sh "${DLLSPATH}" ruledit ; then RET=1 RULEDIT="Fail" else RULEDIT="Success" fi -echo "Gtk3.22: $GTK322" -echo "Gtk4: $GTK4" -echo "Qt5: $QT5" -echo "Qt6: $QT6" -echo "Sdl2: $SDL2" -echo "Ruledit: $RULEDIT" +echo "Gtk3.22: ${GTK322}" +echo "Gtk4: ${GTK4}" +echo "Qt5: ${QT5}" +echo "Qt6: ${QT6}" +echo "Sdl2: ${SDL2}" +echo "Ruledit: ${RULEDIT}" exit $RET -- 2.40.1