#!/bin/sh

set -e

if [ \( "$1" = "upgrade" -o "$1" = "remove" \) \
     -a -L /usr/doc/mawk ]; then
      rm -f /usr/doc/mawk
fi

if [ "$1" != "upgrade" ]; then
  update-alternatives --remove awk /usr/bin/mawk
fi

exit 0
