#!/bin/sh -e

if [ "$1" != "upgrade" ]; then
  update-alternatives --remove editor /usr/bin/joe
  update-alternatives --remove editorrc /etc/joe/joerc
  update-alternatives --remove editor /usr/bin/jmacs
  update-alternatives --remove editorrc /etc/joe/jmacsrc
  update-alternatives --remove editor /usr/bin/jstar
  update-alternatives --remove editorrc /etc/joe/jstarrc
  update-alternatives --remove editor /usr/bin/jpico
  update-alternatives --remove editorrc /etc/joe/jpicorc
  update-alternatives --remove editor /usr/bin/rjoe
  update-alternatives --remove editorrc /etc/joe/rjoerc
fi
