commit 01f6447471c57eed9919e3925bde35e786cb3f55 parent a8e9409d57193b26774dddf30ae354187c4ba364 Author: Ashymad <czilukim@o2.pl> Date: Fri, 2 Mar 2018 21:08:36 +0100 aur cleanup function Diffstat:
| A | .config/fish/functions/aur-cleanup.fish | | | 31 | +++++++++++++++++++++++++++++++ |
1 file changed, 31 insertions(+), 0 deletions(-)
diff --git a/.config/fish/functions/aur-cleanup.fish b/.config/fish/functions/aur-cleanup.fish @@ -0,0 +1,31 @@ +function aur-cleanup + set_color -o blue + echo -n ":: " + set_color -o white + echo "Cleaning pacman cache..." + set_color normal + sudo pacman -Sc + set_color -o blue + echo -n ":: " + set_color -o white + echo "Updating custom repositories..." + set_color normal + for repo in /var/cache/pacman/*custom* + cd $repo + repose -zvf (basename $repo) + end + sudo pacman -Sy + set_color -o blue + echo -n ":: " + set_color -o white + echo "Cleaning aur sync cache..." + set_color normal + cd ~/.cache/aurutils/sync + for dir in * + set pkgname (bash -c "source $dir/PKGBUILD;"'echo $pkgname') + if not pacman -Qi $pkgname >/dev/null 2>/dev/null + rm -rvf -- $dir + end + end +end +