📝 Remade dependencycheck
This commit is contained in:
parent
34785bbbf9
commit
12d501164b
1 changed files with 18 additions and 0 deletions
18
scripts/dependencycheck
Executable file
18
scripts/dependencycheck
Executable 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 "$@"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue