#!/bin/sh -e

LIBDIR=/usr/share/jed/lib
PREPARSE=$LIBDIR/preparse.sl

case "$1" in
  install)
	jed-script $PREPARSE || true
        # don't worry if jed-script is missing, because jed runs this scipt
        # again at installation
	;;
  remove)
	find $LIBDIR \( -name \*.slc -o -name \*.dfa \) -print0 \
        | xargs -0 --no-run-if-empty rm
	;;
  *)
	echo "unknown argument --> \"$1"\" >&2
	exit 1
	;;
esac
