#!/bin/bash set -e if [ "$1" = remove ] ; then PKG="lliurex-artwork-defaults-desktop" ORIGINAL_UNITY_FILE="/usr/share/xsessions/ubuntu.desktop" NEW_DIVERTED_FILE="/usr/share/diverted-sessions/ubuntu.desktop" dpkg-divert --remove --package ${PKG} --rename --divert "$NEW_DIVERTED_FILE" "$ORIGINAL_UNITY_FILE" ORIGINAL_UNITY_FILE="/usr/share/xsessions/ubuntu-2d.desktop" NEW_DIVERTED_FILE="/usr/share/diverted-sessions/ubuntu-2d.desktop" dpkg-divert --remove --package ${PKG} --rename --divert "$NEW_DIVERTED_FILE" "$ORIGINAL_UNITY_FILE" ORIGINAL_UPGRADE_FILE="/etc/update-manager/release-upgrades" NEW_DIVERTED_FILE="/usr/share/diverted-sessions/release-upgrades.diverted" PKG="lliurex-artwork-defaults-desktop" if [ -L $ORIGINAL_UPGRADE_FILE ]; then rm -rf $ORIGINAL_UPGRADE_FILE || true dpkg-divert --remove --package ${PKG} --rename --divert "$NEW_DIVERTED_FILE" "$ORIGINAL_UPGRADE_FILE" fi fi #DEBHELPER# exit 0