From 87321860b4497aadd02bfe7fd43ebe59318d371d Mon Sep 17 00:00:00 2001 From: Minijackson Date: Tue, 9 Nov 2021 13:49:51 +0100 Subject: make shellcheck pass + make demo.sh executable --- bash-lib.sh | 12 +++++++++++- demo.sh | 0 2 files changed, 11 insertions(+), 1 deletion(-) mode change 100644 => 100755 demo.sh diff --git a/bash-lib.sh b/bash-lib.sh index b2bb3df..58fbd7a 100644 --- a/bash-lib.sh +++ b/bash-lib.sh @@ -11,23 +11,32 @@ tput() { } NORMAL="$(tput sgr0)" +# shellcheck disable=SC2034 readonly NORMAL BOLD="$(tput bold)" +# shellcheck disable=SC2034 readonly BOLD RED="$(tput setaf 1)" +# shellcheck disable=SC2034 readonly RED GREEN="$(tput setaf 2)" +# shellcheck disable=SC2034 readonly GREEN YELLOW="$(tput setaf 3)" +# shellcheck disable=SC2034 readonly YELLOW BLUE="$(tput setaf 4)" +# shellcheck disable=SC2034 readonly BLUE PURPLE="$(tput setaf 5)" +# shellcheck disable=SC2034 readonly PURPLE CYAN="$(tput setaf 6)" +# shellcheck disable=SC2034 readonly CYAN WHITE="$(tput setaf 7)" +# shellcheck disable=SC2034 readonly WHITE readonly BASH_LIB_LOG_VAR="${BASH_LIB_NAME:-BASH}_LOG" @@ -46,6 +55,7 @@ if is_debug; then else VERBOSE_ARG=() fi +# shellcheck disable=SC2034 readonly VERBOSE_ARG echoe() { @@ -57,7 +67,7 @@ log() { local color="$2" local message="$3" shift 3 - local rest="$@" + local -a rest=("$@") echoe "${BOLD}${color}${level} ${WHITE}${message}${NORMAL}" "${rest[@]}" } diff --git a/demo.sh b/demo.sh old mode 100644 new mode 100755 -- cgit v1.2.3