#!/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 2>/dev/null pacman -r ${tmpdir} \ --config /etc/pacman.conf \ -Sp --print-format "%n" \ base base-devel sudo ${@} | sort > /etc/libretools.d/cleansystem exit $?