From 6aedee710b0bbf8b625fa3a93071e7d9271c627f Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 19 Feb 2023 22:04:14 +0200 Subject: [PATCH 41/41] installer_cross: Remove x-prefixing from shell scripts See osdn #46452 Signed-off-by: Marko Lindqvist --- .../installer_cross/build_all_installers.sh | 12 ++++---- windows/installer_cross/installer_build.sh | 14 +++++----- windows/installer_cross/meson-winbuild.sh | 6 ++-- windows/installer_cross/winbuild.sh | 28 +++++++++---------- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/windows/installer_cross/build_all_installers.sh b/windows/installer_cross/build_all_installers.sh index c6072baa0e..80dce4e3c4 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 @@ -63,7 +63,7 @@ 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 RET=1 @@ -72,7 +72,7 @@ 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 RET=1 @@ -82,7 +82,7 @@ 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 RET=1 diff --git a/windows/installer_cross/installer_build.sh b/windows/installer_cross/installer_build.sh index 6e93399d0c..d608ab5456 100755 --- a/windows/installer_cross/installer_build.sh +++ b/windows/installer_cross/installer_build.sh @@ -108,7 +108,7 @@ add_common_env() { add_glib_env $1 $2 } -if test "x$1" = x || test "x$1" = "x-h" || test "x$1" = "x--help" || test "x$2" = "x" ; then +if test "$1" = x || test "$1" = "-h" || test "$1" = "--help" || test "$2" = "" ; then echo "Usage: $0 " exit 1 fi @@ -144,7 +144,7 @@ case $GUI in exit 1 ;; esac -if test "x$CLIENT" = "x" ; then +if test "$CLIENT" = "" ; then CLIENT="$GUI" fi @@ -161,7 +161,7 @@ SETUP=$(grep "CrosserSetup=" $DLLSPATH/crosser.txt | sed -e 's/CrosserSetup="//' VERREV="$(../../fc_version)" -if test "x$INST_CROSS_MODE" != "xrelease" ; then +if test "$INST_CROSS_MODE" != "release" ; then if test -d ../../.git || test -f ../../.git ; then VERREV="$VERREV-$(cd ../.. && git rev-parse --short HEAD)" GITREVERT=true @@ -209,7 +209,7 @@ if ! add_common_env $DLLSPATH $INSTDIR ; then exit 1 fi -if test "x$GUI" = "xruledit" ; then +if test "$GUI" = "ruledit" ; then if ! cp freeciv-ruledit.cmd $INSTDIR/ then echo "Adding cmd-file failed!" >&2 @@ -291,7 +291,7 @@ else fi ;; esac - if test "x$GUI" = "xsdl2" ; then + if test "$GUI" = "sdl2" ; then if ! ./create-freeciv-sdl2-nsi.sh \ "$INSTDIR" "autotools/Output" "$VERREV" "$SETUP" \ "helpers/uninstaller-helper-gtk3.sh" \ @@ -300,12 +300,12 @@ else exit 1 fi else - if test "x$GUI" = "xqt5" || test "x$GUI" = "xqt6" ; then + if test "$GUI" = "qt5" || test "$GUI" = "qt6" ; then EXE_ID="qt" else EXE_ID="$GUI" fi - if test "x$GUI" = "xgtk3.22" || test "x$GUI" = "xgtk4" ; then + if test "$GUI" = "gtk3.22" || test "$GUI" = "gtk4" ; then UNINSTALLER="helpers/uninstaller-helper-gtk3.sh" else UNINSTALLER="" diff --git a/windows/installer_cross/meson-winbuild.sh b/windows/installer_cross/meson-winbuild.sh index 8c637f7011..84fc581811 100755 --- a/windows/installer_cross/meson-winbuild.sh +++ b/windows/installer_cross/meson-winbuild.sh @@ -11,12 +11,12 @@ MESON_WINBUILD_VERSION="3.1.0-alpha" MIN_WINVER=0x0603 # Windows 8.1. Qt6-client and Qt6-ruledit builds override this CROSSER_FEATURE_LEVEL=2.5 -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 echo "Usage: $0 " exit 1 fi -if test "x$1" = "x-v" || test "x$1" = "x--version" ; then +if test "$1" = "-v" || test "$1" = "--version" ; then echo "meson-winbuild.sh version $MESON_WINBUILD_VERSION" exit fi @@ -44,7 +44,7 @@ if ! test -f "$DLLSPATH/crosser.txt" ; then fi VERREV="$(../../fc_version)" -if test "x$INST_CROSS_MODE" != "xrelease" ; then +if test "$INST_CROSS_MODE" != "release" ; then if test -d ../../.git || test -f ../../.git ; then VERREV="$VERREV-$(cd ../.. && git rev-parse --short HEAD)" fi diff --git a/windows/installer_cross/winbuild.sh b/windows/installer_cross/winbuild.sh index edb90bdbe8..c6df44343b 100755 --- a/windows/installer_cross/winbuild.sh +++ b/windows/installer_cross/winbuild.sh @@ -13,12 +13,12 @@ WINBUILD_VERSION="2.4.3" MIN_WINVER=0x0603 # Windows 8.1, Qt6-client and Qt6-ruledit builds override this CROSSER_FEATURE_LEVEL=2.5 -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 echo "Usage: $0 [gui]" exit 1 fi -if test "x$1" = "x-v" || test "x$1" = "x--version" ; then +if test "$1" = "-v" || test "$1" = "--version" ; then echo "winbuild.sh version $WINBUILD_VERSION" exit fi @@ -36,7 +36,7 @@ if ! test -f "$DLLSPATH/crosser.txt" ; then fi VERREV="$(../../fc_version)" -if test "x$INST_CROSS_MODE" != "xrelease" ; then +if test "$INST_CROSS_MODE" != "release" ; then if test -d ../../.git || test -f ../../.git ; then VERREV="$VERREV-$(cd ../.. && git rev-parse --short HEAD)" fi @@ -62,7 +62,7 @@ SETUP=$(grep "CrosserSetup=" $DLLSPATH/crosser.txt | sed -e 's/CrosserSetup="//' # to Qt headers allow. Currently needed in all cases. CXXFLAGS="-Wno-error=attributes" -if test "x$2" = "xruledit" ; then +if test "$2" = "ruledit" ; then SINGLE_GUI=true GUIP="-ruledit" RULEDIT="yes" @@ -70,11 +70,11 @@ if test "x$2" = "xruledit" ; then FCMP="no" SERVER="no" AIS="--enable-ai-static=stub" -elif test "x$2" != "x" ; then +elif test "$2" != "" ; then SINGLE_GUI=true GUIP="-$2" SERVER="yes" - if test "x$2" = "xqt5" || test "x$2" = "xqt6" ; then + if test "$2" = "qt5" || test "$2" = "qt6" ; then RULEDIT="yes" CLIENTS="qt" else @@ -99,11 +99,11 @@ else RULEDIT="yes" fi -if test "x$NAMEP" = "x" ; then +if test "$NAMEP" = "" ; then NAMEP="$GUIP" fi -if test "x$MAKE_PARAMS" = "x" ; then +if test "$MAKE_PARAMS" = "" ; then MAKE_PARAMS="-j$(nproc)" fi @@ -121,14 +121,14 @@ fi if test "$SETUP" = "win64" ; then TARGET=x86_64-w64-mingw32 - if test "x$SINGLE_GUI" != "xtrue" ; then + if test "$SINGLE_GUI" != "true" ; then CLIENTS="sdl2,gtk3.22" FCMP="gtk3,cli" fi VERREV="win64-$VERREV" elif test "$SETUP" = "win32" ; then TARGET=i686-w64-mingw32 - if test "x$SINGLE_GUI" != "xtrue" ; then + if test "$SINGLE_GUI" != "true" ; then CLIENTS="sdl2,gtk3.22" FCMP="gtk3,cli" fi @@ -162,10 +162,10 @@ if test "$SINGLE_GUI" != "true" ; then fi fi -if test "x$QTVER" = "xQt5" ; then +if test "$QTVER" = "Qt5" ; then QTPARAMS="--with-qtver=Qt5 --with-qt5-includes=${DLLSPATH}/qt5/include --with-qt5-libs=${DLLSPATH}/lib" MOC_CROSSER="${DLLSPATH}/bin/moc" -elif test "x$QTVER" = "xQt6"; then +elif test "$QTVER" = "Qt6"; then QTPARAMS="--with-qtver=Qt6 --with-qt6-includes=${DLLSPATH}/qt6/include --with-qt6-libs=${DLLSPATH}/lib" MOC_CROSSER="${DLLSPATH}/linux/libexec/moc-qt6" fi @@ -189,13 +189,13 @@ INSTALL_DIR="$(pwd)/freeciv-${VERREV}${NAMEP}" if ! ( cd "${BUILD_DIR}" -if test "x$INST_CROSS_MODE" = "xsnapshot" ; then +if test "$INST_CROSS_MODE" = "snapshot" ; then GITREVP="--enable-gitrev" else GITREVP="" fi -if test "x$MOCCMD" = "x" && test "x$MOC_CROSSER" != "x" ; then +if test "$MOCCMD" = "" && test "$MOC_CROSSER" != "" ; then MOCPARAM="MOCCMD=${MOC_CROSSER}" fi -- 2.39.1