♻️ Refactored to list all dependencies in output
This commit is contained in:
parent
430ebd7572
commit
d4cfda959b
1 changed files with 4 additions and 2 deletions
|
|
@ -20,14 +20,16 @@ function dependencycheck()
|
|||
if ! command -v "${dependencies[$i]}" &> /dev/null ; then
|
||||
echo "${txtred} dependency not met: ${dependencies[$i]}${txtwhite}"
|
||||
missingdependencies=$((missingdependencies+1))
|
||||
else
|
||||
echo "${txtgreen} dependency met: ${dependencies[$i]}${txtwhite}"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $missingdependencies -gt 0 ] ; then
|
||||
exit 1
|
||||
# comment out if using in other scripts
|
||||
# comment out if used in other scripts
|
||||
else
|
||||
echo "${txtgreen} All dependencies met!"
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue