diff --git a/scripts/build b/scripts/build index 9274410488..01c5b52525 100755 --- a/scripts/build +++ b/scripts/build @@ -10,7 +10,7 @@ cd $basedir if [[ "$OSTYPE" == "cygwin" || "$OSTYPE" == "msys" ]]; then # Patch version.h - if [[ "$OPENRCT2_BUILD" != "" ]]; then + if [[ -n "$OPENRCT2_BUILD" ]]; then echo -e "\033[0;36mPatching version.h...\033[0m" fileversion=$OPENRCT2_VERSION.$OPENRCT2_BUILD productversion="$fileversion-${OPENRCT2_SHA1_SHORT}" diff --git a/scripts/build-installer b/scripts/build-installer index 2f2fb5adff..01a6784de3 100755 --- a/scripts/build-installer +++ b/scripts/build-installer @@ -17,7 +17,7 @@ if [[ "$1" == "-i" ]]; then fi basedir="$(readlink -f `dirname $0`/..)" -if [[ "$output" == "" ]]; then +if [[ -z "$output" ]]; then mkdir -p "$basedir/artifacts" output="$basedir/artifacts/openrct2-installer-$CONFIGURATION-$PLATFORM.exe" fi diff --git a/scripts/linux/build-appimage.sh b/scripts/linux/build-appimage.sh index 3c978a1cdf..cf37d7a365 100755 --- a/scripts/linux/build-appimage.sh +++ b/scripts/linux/build-appimage.sh @@ -1,7 +1,7 @@ #!/bin/bash -ex # use RAM disk if possible -if [ "$CI" == "" ] && [ -d /dev/shm ]; then +if [ -z "$CI" ] && [ -d /dev/shm ]; then TEMP_BASE=/dev/shm else TEMP_BASE=/tmp @@ -15,7 +15,7 @@ cleanup () { fi } -if [ "$NO_CLEANUP" == "" ] && trap cleanup EXIT +if [ -z "$NO_CLEANUP" ] && trap cleanup EXIT # store repo root as variable REPO_ROOT=$(readlink -f $(dirname "$0")/../..) diff --git a/scripts/setenv b/scripts/setenv index bfbeb369e6..8ca470d362 100755 --- a/scripts/setenv +++ b/scripts/setenv @@ -34,7 +34,7 @@ else export OPENRCT2_PUSH=true fi fi -if [[ "$OPENRCT2_ORG_TOKEN" == "" ]]; then +if [[ -z "$OPENRCT2_ORG_TOKEN" ]]; then unset OPENRCT2_PUSH fi diff --git a/scripts/upload-backtrace-symbols b/scripts/upload-backtrace-symbols index b4c5afefe7..e437817d1c 100755 --- a/scripts/upload-backtrace-symbols +++ b/scripts/upload-backtrace-symbols @@ -11,7 +11,7 @@ fi path=$1 -if [ "$BACKTRACE_IO_TOKEN" == "" ]; then +if [ -z "$BACKTRACE_IO_TOKEN" ]; then echo -e "\033[0;31mBACKTRACE_IO_TOKEN not set" exit 1 fi diff --git a/scripts/upload-build b/scripts/upload-build index 76e9cf5e3a..251df1a897 100755 --- a/scripts/upload-build +++ b/scripts/upload-build @@ -71,13 +71,13 @@ case "$flavour" in exit 1 esac -if [ "$branch" != "" ]; then +if [ -n "$branch" ]; then versionextra=-$branch-${sha1:0:7} fi filename=OpenRCT2-$version$versionextra-$flavour echo -e "\033[0;36mUploading to openrct2.org as '$filename'..." -if [ "$OPENRCT2_ORG_TOKEN" == "" ]; then +if [ -z "$OPENRCT2_ORG_TOKEN" ]; then echo -e "\033[0;31mOPENRCT2_ORG_TOKEN not set" exit 1 fi diff --git a/src/openrct2-android/gradlew b/src/openrct2-android/gradlew index 9d82f78915..14d3e67fd5 100755 --- a/src/openrct2-android/gradlew +++ b/src/openrct2-android/gradlew @@ -120,7 +120,7 @@ if $cygwin ; then done OURCYGPATTERN="(^($ROOTDIRS))" # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then + if [ -n "$GRADLE_CYGPATTERN" ] ; then OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" fi # Now convert the arguments - kludge to limit ourselves to /bin/sh