#!/bin/sh

# update-configlets - cause frontends, etc. to update themselves.
#
# $Progeny$
#
# This script should be run by the postinst of any package that
# provides any new functionality to the configlet system.  It
# calls all scripts in /etc/configlet.d with whatever parameters
# are passed to this script.  Valid parameters are:
#
# --update
# --install-all
# --remove-all
# --install <configlet-dir>
# --remove <configlet-dir>
# --reinstall <configlet-dir>
#
# <configlet-dir> is the directory where a configlet is stored.

scripts=$(echo /etc/configlet.d/*)

if [ "$scripts" != "/etc/configlet.d/*" ]; then
    for script in $scripts; do
        if [ -f $script -a -x $script ]; then
            $script "$@"
        fi
    done
fi

# vim:set ai et sts=4 sw=4 tw=0:
