#!/bin/sh # prerm script for language-pack-valencian # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `upgrade' # * `failed-upgrade' # * `remove' `in-favour' # * `deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in remove) ORIGINAL_FILE_INSTRUMENTS="/usr/share/mscore-2.0/locale/instruments_ca@valencia.qm" ORIGINAL_FILE_MSCORE="/usr/share/mscore-2.0/locale/mscore_ca@valencia.qm" NEW_DIVERTED_INSTRUMENTS="/usr/share/mscore-2.0/locale/instruments_ca@valencia.qm.diverted" NEW_DIVERTED_MSCORE="/usr/share/mscore-2.0/locale/mscore_ca@valencia.qm.diverted" LLIUREX_FILE_INSTRUMENTS="/usr/share/mscore-2.0/locale/instruments_ca@valencia.qm.lliurex" LLIUREX_FILE_MSCORE="/usr/share/mscore-2.0/locale/mscore_ca@valencia.qm.lliurex" if [ -L "$ORIGINAL_FILE_INSTRUMENTS" ]; then rm -rf "$ORIGINAL_FILE_INSTRUMENTS" || true dpkg-divert --remove --package ${PKG} --rename --divert "$NEW_DIVERTED_INSTRUMENTS" "$ORIGINAL_FILE_INSTRUMENTS" fi if [ -L "$ORIGINAL_FILE_MSCORE" ]; then rm -rf "$ORIGINAL_FILE_MSCORE" || true dpkg-divert --remove --package ${PKG} --rename --divert "$NEW_DIVERTED_MSCORE" "$ORIGINAL_FILE_MSCORE" fi # Diversions for Audacity ORIGINAL_AUDACITY="/usr/share/locale/ca_ES@valencia/LC_MESSAGES/audacity.mo" DIVERTED_AUDACITY="/usr/share/locale/ca_ES@valencia/LC_MESSAGES/audacity.mo.diverted" LLX_AUDACITY="/usr/share/locale/ca_ES@valencia/LC_MESSAGES/audacity-llx.mo" if [ ! -L "$ORIGINAL_AUDACITY" ]; then rm -rf "$ORIGINAL_AUDACITY" || true dpkg-divert --remove --package ${PKG} --rename --divert "$DIVERTED_AUDACITY" "$ORIGINAL_AUDACITY" fi ;; upgrade|deconfigure) ;; failed-upgrade) ;; *) echo "prerm called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0