Colorize outdated script summary
This commit is contained in:
@@ -42,17 +42,19 @@ echo "============================================="
|
|||||||
printf "%-30s | %s\n" "Dependency" "Status"
|
printf "%-30s | %s\n" "Dependency" "Status"
|
||||||
echo "---------------------------------------------"
|
echo "---------------------------------------------"
|
||||||
|
|
||||||
|
red=$(tput setaf 1)
|
||||||
|
green=$(tput setaf 2)
|
||||||
|
normal=$(tput sgr0)
|
||||||
|
|
||||||
for i in "${!command_names[@]}"; do
|
for i in "${!command_names[@]}"; do
|
||||||
name="${command_names[$i]}"
|
name="${command_names[$i]}"
|
||||||
result="${command_results[$i]}"
|
result="${command_results[$i]}"
|
||||||
|
|
||||||
if [ "$result" -eq 0 ]; then
|
if [ "$result" -eq 0 ]; then
|
||||||
status="✓ Up to date"
|
printf "%-30s | %s\n" "$name" "${green}✓ Up to date${normal}"
|
||||||
else
|
else
|
||||||
status="✗ Run update"
|
printf "%-30s | %s\n" "$name" "${red}✗ Run update${normal}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "%-30s | %s\n" "$name" "$status"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "============================================="
|
echo "============================================="
|
||||||
|
|||||||
Reference in New Issue
Block a user