From 920b95c042de6a7ad6a4208c6ce2155d3b32d63f Mon Sep 17 00:00:00 2001 From: Michael Czigler Date: Tue, 21 Jul 2020 09:07:44 -0400 Subject: [PATCH] squash commit, remove non-POSIX features in checkUtils --- git-quick-stats | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 }