#!/bin/sh -e

if [ "$1" = remove ] || [ "$1" = upgrade ] && command -v install-docs >/dev/null 2>&1; then
  install-docs -r lintian
fi

if [ "$1" = "purge" ]; then
  lintian --remove-lab
fi
