diff options
author | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2012-02-05 00:46:06 -0300 |
---|---|---|
committer | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2012-02-05 00:46:06 -0300 |
commit | 9f28620de84a5a35d2ca029ad9145a4b01233929 (patch) | |
tree | edebbb57370c84a6df7bddf7dfb8617edb22eab7 /update-cleansystem | |
parent | d2abc7fe1075bf541cd85b29e8053096ab74fb29 (diff) | |
parent | c5d7675fa4de40514deda2757cd027bb4870424e (diff) |
Merge branch 'master' into fauno
Conflicts:
is_built
Diffstat (limited to 'update-cleansystem')
-rwxr-xr-x | update-cleansystem | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/update-cleansystem b/update-cleansystem new file mode 100755 index 0000000..d4ad943 --- /dev/null +++ b/update-cleansystem @@ -0,0 +1,24 @@ +#!/bin/bash +# Updates the cleansystem file +# Creates a fake Parabola root and prints all packages installable from base +# and base-devel plus extras + +set -E + +if [ ! -w / ]; then + echo "Run as root." + exit 1 +fi + +tmpdir=/tmp/cleansystem.${RANDOM} + +mkdir -p ${tmpdir}/var/lib/pacman + +# We sync first because updating info gets printed to stdout too +pacman -r ${tmpdir} --config /etc/pacman.conf -Sy +pacman -r ${tmpdir} \ + --config /etc/pacman.conf \ + -Sp --print-format "%n" \ + base base-devel ${@} | sort > $(dirname $0)/cleansystem + +exit $? |