Use double brackets instead of single ones

This commit is contained in:
Manuel Colmenero committed 2017-09-18 21:09:03 +02:00
1 parent 3d785360e1
commit bada02a122
1 file changed
+3 -3
+3 -3
View File
@@ -9,7 +9,7 @@ source "$PLUGIN_AVAILABLE_PATH/ps/functions"
get_nginx_location() { get_nginx_location() {
declare desc="check that nginx is at the expected location and return it" declare desc="check that nginx is at the expected location and return it"
local NGINX_LOCATION="/usr/sbin/nginx" local NGINX_LOCATION="/usr/sbin/nginx"
if ! [ -x "$NGINX_LOCATION" ]; then if ! [[ -x "$NGINX_LOCATION" ]]; then
dokku_log_fail "Could not find nginx binary at ${NGINX_LOCATION}." dokku_log_fail "Could not find nginx binary at ${NGINX_LOCATION}."
exit 1; exit 1;
fi fi
@@ -19,7 +19,7 @@ get_nginx_location() {
validate_nginx() { validate_nginx() {
declare desc="validate entire nginx config" declare desc="validate entire nginx config"
local NGINX_LOCATION=$(get_nginx_location) local NGINX_LOCATION=$(get_nginx_location)
if [ -z "$NGINX_LOCATION" ]; then if [[ -z "$NGINX_LOCATION" ]]; then
exit 1; exit 1;
fi fi
@@ -287,7 +287,7 @@ nginx_build_config() {
fi fi
local NGINX_LOCATION=$(get_nginx_location) local NGINX_LOCATION=$(get_nginx_location)
if [ -z "$NGINX_LOCATION" ]; then if [[ -z "$NGINX_LOCATION" ]]; then
exit 1; exit 1;
fi fi
local NGINX_VERSION="$("$NGINX_LOCATION" -v 2>&1 | cut -d'/' -f 2)" local NGINX_VERSION="$("$NGINX_LOCATION" -v 2>&1 | cut -d'/' -f 2)"