diff options
Diffstat (limited to 'system/smart/doinst.sh')
-rw-r--r-- | system/smart/doinst.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/system/smart/doinst.sh b/system/smart/doinst.sh new file mode 100644 index 0000000000..6384c552d9 --- /dev/null +++ b/system/smart/doinst.sh @@ -0,0 +1,23 @@ +# 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 + |