mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
45374bcd46
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
23 lines
635 B
Bash
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
|
|
|