From 9cf2f0c0e95679b62e3dd39bdf66ce375041e4b4 Mon Sep 17 00:00:00 2001 From: Rodrigo Brito Date: Thu, 30 May 2019 14:15:32 -0300 Subject: [PATCH] Include double brackets to avoid parser issues --- update.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/update.sh b/update.sh index ae32dde..1a8da0e 100755 --- a/update.sh +++ b/update.sh @@ -1,27 +1,27 @@ #!/bin/bash -if [ -z ${PLUGIN_NAMESPACE} ]; then +if [[ -z ${PLUGIN_NAMESPACE} ]]; then PLUGIN_NAMESPACE="default" fi -if [ -z ${PLUGIN_KUBERNETES_USER} ]; then +if [[ -z ${PLUGIN_KUBERNETES_USER} ]]; then PLUGIN_KUBERNETES_USER="default" fi -if [ ! -z ${PLUGIN_KUBERNETES_TOKEN} ]; then +if [[ ! -z ${PLUGIN_KUBERNETES_TOKEN} ]]; then KUBERNETES_TOKEN=$PLUGIN_KUBERNETES_TOKEN fi -if [ ! -z ${PLUGIN_KUBERNETES_SERVER} ]; then +if [[ ! -z ${PLUGIN_KUBERNETES_SERVER} ]]; then KUBERNETES_SERVER=$PLUGIN_KUBERNETES_SERVER fi -if [ ! -z ${PLUGIN_KUBERNETES_CERT} ]; then +if [[ ! -z ${PLUGIN_KUBERNETES_CERT} ]]; then KUBERNETES_CERT=${PLUGIN_KUBERNETES_CERT} fi kubectl config set-credentials default --token=${KUBERNETES_TOKEN} -if [ ! -z ${KUBERNETES_CERT} ]; then +if [[ ! -z ${KUBERNETES_CERT} ]]; then echo ${KUBERNETES_CERT} | base64 -d > ca.crt kubectl config set-cluster default --server=${KUBERNETES_SERVER} --certificate-authority=ca.crt else