slackbuilds_ponce/system/smart/doinst.sh
Marcin Slodkiewicz 45374bcd46 system/smart: Added (meta-package manager).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2013-12-03 07:57:36 +07:00

23 lines
635 B
Bash

# Handle the incoming configuration files:
config() {
for infile in $1; do
NEW="$infile"
OLD="`dirname $NEW`/`basename $NEW .new`"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then
# toss the redundant copy
rm $NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
done
}
# Prepare the new configuration file
config etc/smart/channels/channels.new
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications
fi