From 6279830c8b0647d88a25f70a1fa537f2a26037fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Sat, 22 Sep 2012 04:29:07 -0300 Subject: Remove cleanup list right after cleanup --- clean-pacman | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/clean-pacman b/clean-pacman index 0c22ef0..160a0f5 100755 --- a/clean-pacman +++ b/clean-pacman @@ -2,12 +2,14 @@ # Copyright 2012 Nicolás Reynolds Licensed under GPLv3 # # Smart cleanup of the chroot, restores chroot to its original state but also -# leaves the dependencies needed by the current package. +# leaves the dependencies already installed that are needed by the current +# package. In other words, it removes everything that's left. # # Useful when you're building a lot of packages one after another and they # share some dependencies. # -# Logic: tap into `makepkg -s` +# Logic: tap into `makepkg -sr`, collect required packages and remove the +# leftovers # # Use it as the PACMAN var for makepkg: `PACMAN=$0 makepkg` @@ -43,9 +45,10 @@ case $cmd in # At this point $0 is run as root pacman -Rn ${flags[@]} ${cleanup[@]} fi - ;; + # Remove the cleanup log at the end - -R) rm ${cleanup_log} ;; + rm ${cleanup_log} + ;; esac # Make makepkg dreams come true -- cgit v1.1-4-g5e80