slackbuilds_ponce/desktop/compiz-boxmenu/doinst.sh
dsomero 8ff8d4c256 desktop/compiz-boxmenu: Fixed (Handle config files)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
2012-09-29 17:17:39 -05:00

21 lines
628 B
Bash

config() {
NEW="$1"
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...
}
config etc/xdg/compiz/boxmenu/precache.ini.new
config etc/xdg/compiz/boxmenu/menu.xml.new
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
if [ -x /usr/bin/gtk-update-icon-cache ]; then
/usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
fi
fi