diff --git a/git-quick-stats b/git-quick-stats index 76a7d90..16f9d08 100755 --- a/git-quick-stats +++ b/git-quick-stats @@ -74,14 +74,14 @@ _theme="${_MENU_THEME:=default}" # ARGS: None # OUTS: None ################################################################################ -function checkUtils() { - local -r msg="not found. Please make sure this is installed and in PATH." - declare -ar utils=("awk" "basename" "cat" "column" "echo" "git" "grep" "head" - "seq" "sort" "tput" "tr" "uniq" "wc") +checkUtils() { + readonly MSG="not found. Please make sure this is installed and in PATH." + readonly UTILS="awk basename cat column echo git grep head seq sort tput \ + tr uniq wc" - for u in "${utils[@]}" + for u in $UTILS do - command -v "$u" >/dev/null 2>&1 || { echo >&2 "$u ${msg}"; exit 1; } + command -v "$u" >/dev/null 2>&1 || { echo >&2 "$u ${MSG}"; exit 1; } done }