From c5d7675fa4de40514deda2757cd027bb4870424e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Sun, 5 Feb 2012 00:43:43 -0300 Subject: Script to update cleansystem It creates an empty root and prints base and base-devel installation onto cleansystem. Run and commit cleansystem after. --- update-cleansystem | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 update-cleansystem (limited to 'update-cleansystem') 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 $? -- cgit v1.2.3-2-g168b