diff options
author | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-09-22 04:21:42 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-09-22 04:21:42 -0300 |
commit | d469036a9fe5a849060159383be2ff6249c51a62 (patch) | |
tree | 80d5e316c8d8f9f6e6cb28d53683582177d58b72 /update-cleansystem | |
parent | f49a63724e56c11c5ee89561f573fff1b1d56506 (diff) |
Keep the synced database on a permanent dir
Diffstat (limited to 'update-cleansystem')
-rwxr-xr-x | update-cleansystem | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/update-cleansystem b/update-cleansystem index 97c2922..b55e882 100755 --- a/update-cleansystem +++ b/update-cleansystem @@ -3,20 +3,21 @@ # Creates a fake Parabola root and prints all packages installable from base # and base-devel plus extras -set -E +set -e if [ ! -w / ]; then echo "Run as root." exit 1 fi -tmpdir=/tmp/cleansystem.${RANDOM} +# Maintain a clean database in the system +db_dir="${DB:-/var/lib/libretools/clean}" -mkdir -p ${tmpdir}/var/lib/pacman +[ ! -d "${db_dir}" ] && mkdir -p "${db_dir}" # We sync first because updating info gets printed to stdout too -pacman -r ${tmpdir} --config /etc/pacman.conf -Sy 2>/dev/null -pacman -r ${tmpdir} \ +pacman -b "${db_dir}" --config /etc/pacman.conf -Sy 2>/dev/null +pacman -b "${db_dir}" \ --config /etc/pacman.conf \ -Sp --print-format "%n" \ base base-devel sudo ${@} | sort > /etc/libretools.d/cleansystem |