📝 Remade dependencycheck

This commit is contained in:
z3rOR0ne 2023-02-05 23:53:44 -08:00
parent 34785bbbf9
commit 12d501164b

18
scripts/dependencycheck Executable file
View file

@ -0,0 +1,18 @@
#!/usr/bin/env bash
txtbld=$(tput bold)
txtgreen=${txtbld}$(tput setaf 2)
txtred=${txtbld}$(tput setaf 1)
txtwhite=${txtbld}$(tput setaf 7)
dependencycheck() {
for dep in "$@" ; do
if ! command -v "$dep" &> /dev/null ; then
printf "%s\n" "${txtred}✗ dependency not met: ${dep}${txtwhite}"
else
printf "%s\n" "${txtgreen} dependency met: ${dep}${txtgreen}"
fi
done
}
dependencycheck "$@"