diff options
author | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-11-05 16:13:14 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-11-05 16:13:14 -0300 |
commit | 61ca876072f8e7a5a6ab90974db895c57434ae9c (patch) | |
tree | 5c1e719e82d5f298a3bb16ce2fc5d5ba75aac1cc | |
parent | 362ec9e880e784ec9bc2858c635b0279e52af82d (diff) |
Added DRYRUN mode and use libretools.conf
-rwxr-xr-x | chcleanup | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -9,13 +9,12 @@ set -e -source $(dirname $0)/libremessages source /etc/makepkg.conf +source /etc/libretools.conf source ${HOME}/.makepkg.conf 2>/dev/null|| true msg "Cleaning chroot..." - TMPDIR="$(mktemp -d /tmp/$(basename $0)-XXXXX)" cleanup_log="${TMPDIR}"/libretools-cleanup.log @@ -48,9 +47,10 @@ packages=($(comm -23 <(pacman -Qq | sort) \ msg2 "Removing %d packages" ${#packages[@]} # Only remove leftovers, -Rcs removes too much -sudo pacman --noconfirm -Rn ${packages[@]} +${DRYRUN} || sudo pacman --noconfirm -Rn ${packages[@]} +${DRYRUN} && echo ${packages[@]} # Cleanup -rm -fr ${TMPDIR} +${DRYRUN} || rm -fr ${TMPDIR} exit $? |