#!/bin/sh set -e #VARS SWING_FILE_OPENJDK8="/etc/java-8-openjdk/swing.properties" SWING_FILE_OPENJDK9="/etc/java-9-openjdk/swing.properties" SWING_FILE_LLIUREX="/usr/share/lliurex-java-panel/swing.properties" PACKAGE_NAME="lliurex-java-panel" case $1 in remove|purge|abort-install|disappear) if [ -f ${SWING_FILE_OPENJDK8}.diverted ] ; then rm -f ${SWING_FILE_OPENJDK8} dpkg-divert --package ${PACKAGE_NAME} --rename --quiet --remove ${SWING_FILE_OPENJDK8}|| true fi if [ -f ${SWING_FILE_OPENJDK9}.diverted ] ; then rm -f ${SWING_FILE_OPENJDK9} dpkg-divert --package ${PACKAGE_NAME} --rename --quiet --remove ${SWING_FILE_OPENJDK9}| true fi ;; *) echo "Nothing to do" ;; esac