mirror of
https://github.com/arzzen/git-quick-stats.git
synced 2026-09-10 07:36:19 -04:00
Merge pull request #109 from mcpcpc/master
checkUtils: remove non-POSIX compliant features
This commit is contained in:
commit
3283122a38
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue