Add check_utils helper

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2022-10-29 23:14:14 +02:00
parent 00cd75cf61
commit b729c38fcb
Signed by: luzifer
GPG key ID: D91C3E91E4CAD6F5

View file

@ -9,6 +9,12 @@ function check_util() {
command -v ${1} >/dev/null 2>&1 || fail "Missing ${1} util" command -v ${1} >/dev/null 2>&1 || fail "Missing ${1} util"
} }
function check_utils() {
for util in "$@"; do
check_util "${util}"
done
}
function debug() { function debug() {
log_level_matches 0 || return 0 log_level_matches 0 || return 0
echo -e "${COLOR_PURPLE}$@${COLOR_PLAIN}" echo -e "${COLOR_PURPLE}$@${COLOR_PLAIN}"