From ac982819f88755244280b045640bdfb33464e2a0 Mon Sep 17 00:00:00 2001 From: Denys Havrysh Date: Thu, 1 Sep 2016 17:45:15 +0300 Subject: [PATCH] Update .gitignore with more generic pattern for VIM swap files --- .gitignore | 3 +-- bootstrap-salt.sh | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index a4b29eb..2120008 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ /.project -*.swp +*.sw? .vagrant # Pycharm .idea - diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 017d354..eb9fb92 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -592,7 +592,7 @@ else fi # Root permissions are required to run this script -if [ "$(${whoami})" != "root" ]; then +if [ "$($whoami)" != "root" ]; then echoerror "Salt requires root privileges to install. Please re-run this script as root." exit 1 fi @@ -612,14 +612,14 @@ if [ "${CALLER}x" = "${0}x" ]; then fi # Work around for 'Docker + salt-bootstrap failure' https://github.com/saltstack/salt-bootstrap/issues/394 -if [ ${_DISABLE_SALT_CHECKS} -eq $BS_FALSE ] && [ -f /tmp/disable_salt_checks ]; then +if [ "${_DISABLE_SALT_CHECKS}" -eq $BS_FALSE ] && [ -f /tmp/disable_salt_checks ]; then # shellcheck disable=SC2016 echowarn 'Found file: /tmp/disable_salt_checks, setting _DISABLE_SALT_CHECKS=$BS_TRUE' _DISABLE_SALT_CHECKS=$BS_TRUE fi # Because -a can only be installed into virtualenv -if ([ $_PIP_ALL -eq $BS_TRUE ] && [ "$_VIRTUALENV_DIR" = "null" ]); then +if [ "${_PIP_ALL}" -eq $BS_TRUE ] && [ "${_VIRTUALENV_DIR}" = "null" ]; then usage # Could possibly set up a default virtualenv location when -a flag is passed echoerror "Using -a requires -V because pip pkgs should be siloed from python system pkgs" @@ -627,7 +627,7 @@ if ([ $_PIP_ALL -eq $BS_TRUE ] && [ "$_VIRTUALENV_DIR" = "null" ]); then fi # Make sure virtualenv directory does not already exist -if [ -d "$_VIRTUALENV_DIR" ]; then +if [ -d "${_VIRTUALENV_DIR}" ]; then echoerror "The directory ${_VIRTUALENV_DIR} for virtualenv already exists" exit 1 fi