#!/bin/sh set -e # Firefox ESR ORIG_FILE="/usr/bin/firefox" OUR_FILE="/opt/firefox-esr/firefox" OUR_PACKAGE="firefox-esr" case $1 in configure) echo "postinst called with argument \`$1'" >&2 #Firefox link goes here # if dpkg-divert --package ${OUR_PACKAGE} --add --rename --divert ${ORIG_FILE}.real ${ORIG_FILE} ; then # ln -fs ${OUR_FILE} ${ORIG_FILE} # else # echo "Unabe to divert file ${ORIG_FILE}" # fi ;; abort-upgrade|abort-remove|abort-deconfigure) echo "postinst called with argument \`$1'" >&2 exit 1 ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac