Improved ux

This commit is contained in:
Simon
2021-02-16 11:15:58 +01:00
parent 07e555dcbe
commit b38ce7d5f3
3 changed files with 15 additions and 1 deletions
+9 -1
View File
@@ -7,6 +7,10 @@ ENA_UPDATES=$(command -v checkupdates)
CNT_UPDATES="0"
UPDATES="nA"
if [[ "$1" != *"count"* ]]; then
echo "Fetching updates..."
fi
if [ "$ENA_UPDATES" ]; then
UPDATES=$(checkupdates 2>/dev/null)
CNT_UPDATES=$(echo "$UPDATES" | wc -l)
@@ -23,6 +27,10 @@ fi
CNT_UPDATES_TOTAL=$(("$CNT_UPDATES" + "$CNT_UPDATES_AUR"))
if [[ "$1" != *"count"* ]]; then
clear
fi
if [ "$1" == "--count" ]; then
echo "Official: $CNT_UPDATES, AUR: $CNT_UPDATES_AUR, Total: $CNT_UPDATES_TOTAL"
fi
@@ -84,4 +92,4 @@ if [ "$1" == "--list" ]; then
read -rp "Press any key to exit..."
fi
exit
exit