From 53eb3a966d1f7e2c783eae287e2c8ec0a1523021 Mon Sep 17 00:00:00 2001 From: Sofer Athlan-Guyot Date: Thu, 24 Mar 2016 14:39:05 +0100 Subject: [PATCH] Fix bug and non-idiom in bash scripts. Those small typos and non-idiom can lead to unexpected behavior, better fix them now. Change-Id: I218ba0f3bba832d0929fb52c21f7e66774da494e Closes-Bug: #1561539 --- install_modules.sh | 4 ++-- install_modules_unit.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/install_modules.sh b/install_modules.sh index 730da25e4..2c42774ae 100755 --- a/install_modules.sh +++ b/install_modules.sh @@ -2,11 +2,11 @@ set -ex -if [ ! -z ${GEM_HOME} ]; then +if [ -n "${GEM_HOME}" ]; then GEM_BIN_DIR=${GEM_HOME}/bin/ fi -if [ $PUPPET_VERSION == 4 ]; then +if [ "${PUPPET_VERSION}" = 4 ]; then export PUPPET_BASE_PATH=/etc/puppetlabs/code else export PUPPET_BASE_PATH=/etc/puppet diff --git a/install_modules_unit.sh b/install_modules_unit.sh index 5d881d858..e9166c570 100755 --- a/install_modules_unit.sh +++ b/install_modules_unit.sh @@ -6,11 +6,11 @@ set -ex -if [ ! -z ${GEM_HOME} ]; then +if [ -n "${GEM_HOME}" ]; then GEM_BIN_DIR=${GEM_HOME}/bin/ fi -if [ $PUPPET_VERSION == 4 ]; then +if [ "${PUPPET_VERSION}" = 4 ]; then export PUPPET_BASE_PATH=/etc/puppetlabs/code else export PUPPET_BASE_PATH=/etc/puppet