Fixed a dependency-check bug introduced last commit.

This commit is contained in:
Matias Barcenas 2017-08-12 20:08:55 -05:00
parent fb316c25be
commit af07814b8e
1 changed files with 5 additions and 2 deletions

View File

@ -329,13 +329,16 @@ function check_dependencies() {
for CLITool in ${CLITools[*]}; do
# Could use parameter replacement, but requires extra variable.
local toolIdentifier=$(printf "%-44s" "$CLITool" | sed 's/ /./g')
local toolState=$([ ! hash $CLITool 2>/dev/null ] && echo "$CRed Missing!$CClr" || echo ".....$CGrn OK.$CClr")
local toolState=$(! hash $CLITool 2>/dev/null && echo "$CRed Missing!$CClr" || echo ".....$CGrn OK.$CClr")
CLIToolsMissing=$([[ "$toolState" = *"Missing"* ]] && echo true)
format_center "$FLUXIONVLine $toolIdentifier$toolState"
echo -e "$FormatCenter"
done
if [ "$CLIToolsMissing" ]; then
echo
format_center "${CRed}Stopping due to a lack of dependencies!"; echo -e "$FormatCenter"
echo
exit 1
fi