From a41d9078efa5c04645fe30e1f702602d512e70e3 Mon Sep 17 00:00:00 2001 From: Denys Havrysh Date: Thu, 10 Mar 2016 10:53:52 +0200 Subject: [PATCH 1/2] Fix sleep time option to recognize a numeric argument --- bootstrap-salt.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index f8622f6..d580d17 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -18,7 +18,7 @@ #====================================================================================================================== set -o nounset # Treat unset variables as an error -__ScriptVersion="2016.03.09" +__ScriptVersion="2016.03.10" __ScriptName="bootstrap-salt.sh" #====================================================================================================================== @@ -309,7 +309,7 @@ EOT } # ---------- end of function __usage ---------- -while getopts ":hvnDc:Gg:k:MSNXCPFUKIA:i:Lp:dH:Zbsf" opt +while getopts ":hvnDc:Gg:k:s:MSNXCPFUKIA:i:Lp:dH:Zbf" opt do case "${opt}" in @@ -348,7 +348,7 @@ do fi ;; - s ) _SLEEP="$OPTARG" ;; + s ) _SLEEP=$OPTARG ;; M ) _INSTALL_MASTER=$BS_TRUE ;; S ) _INSTALL_SYNDIC=$BS_TRUE ;; N ) _INSTALL_MINION=$BS_FALSE ;; From 1b9ea4f00fd62f256735270cc0ad08da29c05013 Mon Sep 17 00:00:00 2001 From: Denys Havrysh Date: Thu, 10 Mar 2016 11:01:22 +0200 Subject: [PATCH 2/2] Ignore lint warning `SC2164` --- bootstrap-salt.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index d580d17..7a267f8 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1348,6 +1348,7 @@ __git_clone_and_checkout() { if [ "$__SHALLOW_CLONE" -eq "${BS_FALSE}" ]; then git clone "$_SALT_REPO_URL" "$__SALT_CHECKOUT_REPONAME" || return 1 + # shellcheck disable=SC2164 cd "${_SALT_GIT_CHECKOUT_DIR}" if [ "$(echo "$_SALT_REPO_URL" | grep -c -e '\(\(git\|https\)://github\.com/\|git@github\.com:\)saltstack/salt\.git')" -eq 0 ]; then