# HG changeset patch # User Christophe Lincoln # Date 1396666916 -7200 # Node ID 4f34d6addbf3fbe42ea3b45db529ff99237be601 # Parent b1e6edfdb9b7e1a688ad1c4736953f2ce3eee052 spk: add reconf command diff -r b1e6edfdb9b7 -r 4f34d6addbf3 spk --- a/spk Wed Apr 02 00:06:47 2014 +0200 +++ b/spk Sat Apr 05 05:01:56 2014 +0200 @@ -13,7 +13,7 @@ # Functions # -VERSION=1.0 +VERSION=1.3 # Help and usage usage() { @@ -28,6 +28,7 @@ info $(gettext "Display path, mirror and other stats") activity $(gettext "Display packages activities") clean $(gettext "Clean cache and temporary files") + reconf $(gettext "Reconfigure an installed packages") $(boldify $(gettext "Options:")) --add $(gettext "Install packages if mirrored") @@ -90,6 +91,19 @@ rm -rf $(dirname $tmpdir) && status separator && newline exit 0 ;; + reconf|reconfigure) + packages="$@" + [ "$all" ] && packages=$(ls $installed) + for pkg in ${packages} + do + receipt="$installed/$pkg/receipt" + [ ! -f "$receipt" ] && continue + if grep -q ^post_install ${receipt}; then + gettext "Configuring packages:"; echo " $pkg" + . ${receipt} + post_install + fi + done && exit 0 ;; esac #