From bb190ae6d4965cd18cdedc5d193f703a1ce75ad2 Mon Sep 17 00:00:00 2001 From: Waldz Date: Thu, 12 Jul 2018 01:04:43 +0300 Subject: [PATCH] Fix ternary expression (with default value) in Bash scripts Signed-off-by: Waldz --- .travis.yml | 2 +- bin/client_build | 4 ++-- bin/client_package_debian | 2 +- bin/client_package_standalone | 2 +- bin/server_build | 4 ++-- bin/server_package_debian | 2 +- bin/server_package_standalone | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index c61016f081..bb06ec4465 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,7 @@ install: - glide "-home" $GLIDE_HOME install script: - - BUILD_VERSION=${TRAVIS_TAG:="$BUILD_VERSION_MAJOR-dev.$TRAVIS_BUILD_NUMBER"} + - BUILD_VERSION=${TRAVIS_TAG:-"$BUILD_VERSION_MAJOR-dev.$TRAVIS_BUILD_NUMBER"} - bin/check_vet # This check requires development dependency - bin/builder_run bin/check_lint diff --git a/bin/client_build b/bin/client_build index 6cab70e005..454d44619e 100755 --- a/bin/client_build +++ b/bin/client_build @@ -18,8 +18,8 @@ source bin/helpers/functions.sh -export GOOS=${GOOS:=`go env GOHOSTOS`} -export GOARCH=${GOARCH:=`go env GOHOSTARCH`} +export GOOS=${GOOS:-`go env GOHOSTOS`} +export GOARCH=${GOARCH:-`go env GOHOSTARCH`} export GOBIN=`pwd`/build/client echo "Compiling 'mysterium_client' for '$GOOS/$GOARCH'.." diff --git a/bin/client_package_debian b/bin/client_package_debian index a23b2c6938..c7b9f8f7aa 100755 --- a/bin/client_package_debian +++ b/bin/client_package_debian @@ -22,7 +22,7 @@ OS_DIR_CONFIG="/etc/mysterium-client" OS_DIR_DOC="/usr/share/doc/mysterium-client" OS_DIR_INSTALLATION="/usr/lib/mysterium-client/installation" OS_DIR_SUDOERS="/etc/sudoers.d" -BINARY=${BINARY:="build/client/mysterium_client"} +BINARY=${BINARY:-"build/client/mysterium_client"} VERSION=$1 if [ -z "$VERSION" ]; then diff --git a/bin/client_package_standalone b/bin/client_package_standalone index b6ba97bf72..db2ad95e1b 100755 --- a/bin/client_package_standalone +++ b/bin/client_package_standalone @@ -22,7 +22,7 @@ if [[ ! "$OS" =~ ^(linux|darwin|windows)$ ]]; then exit 1 fi -BINARY=${BINARY:="build/client/mysterium_client"} +BINARY=${BINARY:-"build/client/mysterium_client"} DIR_BUILD="build/package" # Put all files to package directory (to avoid preserving directory structure) diff --git a/bin/server_build b/bin/server_build index a7d5c44478..b0947d921f 100755 --- a/bin/server_build +++ b/bin/server_build @@ -18,8 +18,8 @@ source bin/helpers/functions.sh -export GOOS=${GOOS:=`go env GOHOSTOS`} -export GOARCH=${GOARCH:=`go env GOHOSTARCH`} +export GOOS=${GOOS:-`go env GOHOSTOS`} +export GOARCH=${GOARCH:-`go env GOHOSTARCH`} export GOBIN=`pwd`/build/server echo "Compiling 'mysterium_server' for '$GOOS/$GOARCH'.." diff --git a/bin/server_package_debian b/bin/server_package_debian index 7d109a265c..11113bfcef 100755 --- a/bin/server_package_debian +++ b/bin/server_package_debian @@ -22,7 +22,7 @@ OS_DIR_CONFIG="/etc/mysterium-node" OS_DIR_DOC="/usr/share/doc/mysterium-node" OS_DIR_INSTALLATION="/usr/lib/mysterium-node/installation" OS_DIR_SUDOERS="/etc/sudoers.d" -BINARY=${BINARY:="build/server/mysterium_server"} +BINARY=${BINARY:-"build/server/mysterium_server"} VERSION=$1 if [ -z "$VERSION" ]; then diff --git a/bin/server_package_standalone b/bin/server_package_standalone index 06c0311453..1806506928 100755 --- a/bin/server_package_standalone +++ b/bin/server_package_standalone @@ -22,7 +22,7 @@ if [[ ! "$OS" =~ ^(linux|darwin|windows)$ ]]; then exit 1 fi -BINARY=${BINARY:="build/server/mysterium_server"} +BINARY=${BINARY:-"build/server/mysterium_server"} DIR_BUILD="build/package" # Put all files to package directory (to avoid preserving directory structure)