#!/bin/bash set -e APPORT_FILE="/etc/default/apport" if [ "$1" = "configure" ] ; then PKG="lliurex-artwork-defaults-common" ORIGINAL_WHISKER_ES_FILE="/usr/share/locale/es/LC_MESSAGES/xfce4-whiskermenu-plugin.mo" NEW_DIVERTED_ES_FILE="/usr/share/lliurex-artwork-defaults/diversions/xfce4-whiskermenu-plugin-es.diverted" ORIGINAL_WHISKER_ES_FILE1="/usr/share/locale/es/LC_MESSAGES/mate-xfce4-panel-plugin-loader-applet.mo" NEW_DIVERTED_ES_FILE1="/usr/share/lliurex-artwork-defaults/diversions/mate-xfce4-panel-plugin-loader-applet.mo-es.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/lliurex-artwork-defaults/diversions/xfce4-whiskermenu-plugin-ca.diverted" ORIGINAL_WHISKER_CA_FILE1="/usr/share/locale/ca/LC_MESSAGES/mate-xfce4-panel-plugin-loader-applet.mo" NEW_DIVERTED_CA_FILE1="/usr/share/lliurex-artwork-defaults/diversions/mate-xfce4-panel-plugin-loader-applet.mo-ca.diverted" LLIUREX_CA_FILE="/usr/share/lliurex-artwork-defaults/whiskermenu/locale/ca/xfce4-whiskermenu-plugin.mo" ORIGINAL_AUTOSTART_FILE="/etc/xdg/autostart/deja-dup-monitor.desktop" DIVERTED_AUTOSTART_FILE="/usr/share/lliurex-artwork-defaults/diversions/deja-dup-monitor.desktop" ORIGINAL_AUTOSTART_FILE1="/usr/share/mate/autostart/tilda.desktop" DIVERTED_AUTOSTART_FILE1="/usr/share/lliurex-artwork-defaults/diversions/tilda.desktop" ORIGINAL_LO_MOD="/usr/share/ubuntu-mate/settings-overlay/config/libreoffice/4/user/registrymodifications.xcu" DIVERTED_LO_MOD="/usr/share/lliurex-artwork-defaults/diversions/registrymodifications.xcu" LLIUREX_LO_MOD="/usr/share/lliurex-artwork-defaults/libreoffice/registrymodifications.xcu" ORIGINAL_GEOGEBRA="/etc/cron.daily/geogebra" DIVERTED_GEOGEBRA="/usr/share/lliurex-artwork-defaults/diversions/geogebra" if [ ! -L "$ORIGINAL_WHISKER_ES_FILE" ]; then dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_ES_FILE" "$ORIGINAL_WHISKER_ES_FILE" ln -s "$LLIUREX_ES_FILE" "$ORIGINAL_WHISKER_ES_FILE" fi if [ ! -L "$ORIGINAL_WHISKER_CA_FILE" ]; then dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_CA_FILE" "$ORIGINAL_WHISKER_CA_FILE" ln -s "$LLIUREX_CA_FILE" "$ORIGINAL_WHISKER_CA_FILE" fi if [ ! -L "$ORIGINAL_WHISKER_ES_FILE1" ]; then dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_ES_FILE1" "$ORIGINAL_WHISKER_ES_FILE1" ln -s "$LLIUREX_ES_FILE" "$ORIGINAL_WHISKER_ES_FILE1" fi if [ ! -L "$ORIGINAL_WHISKER_CA_FILE1" ]; then dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_CA_FILE1" "$ORIGINAL_WHISKER_CA_FILE1" ln -s "$LLIUREX_CA_FILE" "$ORIGINAL_WHISKER_CA_FILE1" fi if [ ! -e "$DIVERTED_AUTOSTART_FILE" ]; then dpkg-divert --add --package ${PKG} --rename --divert "$DIVERTED_AUTOSTART_FILE" "$ORIGINAL_AUTOSTART_FILE" fi if [ ! -e "$DIVERTED_AUTOSTART_FILE1" ]; then dpkg-divert --add --package ${PKG} --rename --divert "$DIVERTED_AUTOSTART_FILE1" "$ORIGINAL_AUTOSTART_FILE1" fi if [ ! -L "$ORIGINAL_LO_MOD" ]; then dpkg-divert --add --package ${PKG} --rename --divert "$DIVERTED_LO_MOD" "$ORIGINAL_LO_MOD" ln -s "$LLIUREX_LO_MOD" "$ORIGINAL_LO_MOD" fi if [ ! -e "$DIVERTED_GEOGEBRA" ]; then dpkg-divert --add --package ${PKG} --rename --divert "$DIVERTED_GEOGEBRA" "$ORIGINAL_GEOGEBRA" fi update-alternatives --install /usr/bin/x-session-manager x-session-manager /usr/bin/mate-session 60 || true update-alternatives --set x-session-manager /usr/bin/mate-session || true fi #DEBHELPER# exit 0