#!/bin/sh set -e HOST_ARCH="$1" HOST_MULTIARCH="$2" # Create /usr/share/file/magic.mgc as a symlink if the installed # libmagic1 is in the primary architecture. [ "$HOST_MULTIARCH" ] cat <<__EOS__ >>debian/libmagic1.postinst.debhelper if [ "\$1" = 'configure' ] && [ "\$(dpkg --print-architecture)" = '$HOST_ARCH' ] ; then ln -sf /usr/lib/$HOST_MULTIARCH/file/magic.mgc /usr/share/file/magic.mgc fi __EOS__ cat <<__EOS__ >>debian/libmagic1.prerm.debhelper if [ "\$1" = 'configure' ] && [ "\$(dpkg --print-architecture)" = '$HOST_ARCH' ] && [ -L /usr/share/file/magic.mgc ] ; then rm /usr/share/file/magic.mgc fi __EOS__