Skip to content

Commit

Permalink
Fix pacman's cache checking
Browse files Browse the repository at this point in the history
  • Loading branch information
Antiz96 committed Jan 6, 2024
1 parent 29393f5 commit 043289b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/script/arch-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,8 @@ orphan_packages() {

# Definition of the packages_cache function: Search for old package archives in the pacman cache and offer to remove them if there are
packages_cache() {
pacman_cache_old=$(paccache -dk3 | sed -n 's/.*: \([0-9]*\) candidate.*/\1/p')
pacman_cache_uninstalled=$(paccache -duk0 | sed -n 's/.*: \([0-9]*\) candidate.*/\1/p')
pacman_cache_old=$(paccache -dk"${old_packages_num}" | sed -n 's/.*: \([0-9]*\) candidate.*/\1/p')
pacman_cache_uninstalled=$(paccache -duk"${uninstalled_packages_num}" | sed -n 's/.*: \([0-9]*\) candidate.*/\1/p')

[ -z "${pacman_cache_old}" ] && pacman_cache_old="0"
[ -z "${pacman_cache_uninstalled}" ] && pacman_cache_uninstalled="0"
Expand Down

0 comments on commit 043289b

Please sign in to comment.