#!/bin/bash set -e if [ "$1" = "remove" ] ; then PKG="lliurex-artwork-defaults-desktop" ORIGINAL_UNITY_FILE="/usr/share/xsessions/mate.desktop" NEW_DIVERTED_FILE="/usr/share/diverted-sessions/mate.desktop" dpkg-divert --remove --package ${PKG} --rename --divert "$NEW_DIVERTED_FILE" "$ORIGINAL_UNITY_FILE" ORIGINAL_UNITY_FILE="/etc/skel/.config/autostart/ubuntu-mate-welcome.desktop" NEW_DIVERTED_FILE="/usr/share/diverted-sessions/ubuntu-mate-welcome.desktop" dpkg-divert --remove --package ${PKG} --rename --divert "$NEW_DIVERTED_FILE" "$ORIGINAL_UNITY_FILE" ORIGINAL_WHISKER_ES_FILE="/usr/share/locale/es/LC_MESSAGES/xfce4-whiskermenu-plugin.mo" NEW_DIVERTED_ES_FILE="/usr/share/locale/es/LC_MESSAGES/xfce4-whiskermenu-plugin.diverted" LLIUREX_ES_FILE="/usr/share/lliurex-artwork-defaults/whiskermenu/locale/es/xfce4-whiskermenu-plugin.mo" ORIGINAL_WHISKER_CA_FILE="/usr/share/locale/ca/LC_MESSAGES/xfce4-whiskermenu-plugin.mo" NEW_DIVERTED_CA_FILE="/usr/share/locale/ca/LC_MESSAGES/xfce4-whiskermenu-plugin.diverted" LLIUREX_CA_FILE="/usr/share/lliurex-artwork-defaults/whiskermenu/locale/ca/xfce4-whiskermenu-plugin.mo" if [ -f "$NEW_DIVERTED_ES_FILE" ]; then rm -rf $ORIGINAL_WHISKER_ES_FILE || true dpkg-divert --remove --package ${PKG} --rename --divert "$NEW_DIVERTED_ES_FILE" "$ORIGINAL_WHISKER_ES_FILE" fi if [ -f "$NEW_DIVERTED_CA_FILE" ]; then rm -rf $ORIGINAL_WHISKER_CA_FILE || true dpkg-divert --remove --package ${PKG} --rename --divert "$NEW_DIVERTED_CA_FILE" "$ORIGINAL_WHISKER_CA_FILE" fi update-alternatives \ --remove lliurex-default-background.png /usr/share/backgrounds/lliurex/lliurex16-desktop-HD.png update-alternatives --auto lliurex-default-background.png fi #DEBHELPER# exit 0