#!/bin/sh # postinst script for language-pack-valencian # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in configure) PKG="language-pack-lliurex-valencian-base" 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" #ORIGINAL_FILE="/etc/ltsp/ltsp-update-image.excludes" #NEW_DIVERTED_FILE="/etc/ltsp/ltsp-update-image.excludes.diverted" #LLIUREX_FILE="/etc/ltsp/ltsp-update-image.excludes.lliurex" if [ ! -L "$ORIGINAL_FILE_INSTRUMENTS" ]; then dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_INSTRUMENTS" "$ORIGINAL_FILE_INSTRUMENTS" ln -s "$LLIUREX_FILE_INSTRUMENTS" "$ORIGINAL_FILE_INSTRUMENTS" fi if [ ! -L "$ORIGINAL_FILE_MSCORE" ]; then dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_MSCORE" "$ORIGINAL_FILE_MSCORE" ln -s "$LLIUREX_FILE_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 dpkg-divert --add --package ${PKG} --rename --divert "$DIVERTED_AUDACITY" "$ORIGINAL_AUDACITY" ln -s "$LLX_AUDACITY" "$ORIGINAL_AUDACITY" fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst 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