Skip to content

Commit

Permalink
Correct alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
Antiz96 committed Jan 4, 2024
1 parent 130dfc3 commit 4fae7e7
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/script/arch-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -406,32 +406,40 @@ packages_cache() {
echo
main_msg "Removing old cached packages..."

if ! "${su_cmd}" paccache -r && echo; then
if ! "${su_cmd}" paccache -r; then
echo
error_msg "An error has occurred during the removal process\nThe removal has been aborted\n"
else
echo
fi
elif [ "${pacman_cache_old}" -eq 0 ] && [ "${pacman_cache_uninstalled}" -gt 0 ]; then
echo
main_msg "Removing uninstalled cached packages..."

if ! "${su_cmd}" paccache -ruk0 && echo; then
if ! "${su_cmd}" paccache -ruk0; then
echo
error_msg "An error has occurred during the removal process\nThe removal has been aborted\n"
else
echo
fi
elif [ "${pacman_cache_old}" -gt 0 ] && [ "${pacman_cache_uninstalled}" -gt 0 ]; then
echo
main_msg "Removing old cached packages..."

if ! "${su_cmd}" paccache -r && echo; then
if ! "${su_cmd}" paccache -r; then
echo
error_msg "An error has occurred during the removal process\nThe removal has been aborted\n"
else
echo
fi

main_msg "Removing uninstalled cached packages..."

if ! "${su_cmd}" paccache -ruk0 && echo; then
if ! "${su_cmd}" paccache -ruk0; then
echo
error_msg "An error has occurred during the removal process\nThe removal has been aborted\n"
else
echo
fi
fi
;;
Expand Down

0 comments on commit 4fae7e7

Please sign in to comment.