js2-mode-remove.sh 626 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/sh -e
  2. # /usr/lib/emacsen-common/packages/remove/js2-mode
  3. FLAVOR=$1
  4. PACKAGE=js2-mode
  5. STARTDIR=/etc/${FLAVOR}/site-start.d
  6. STARTFILE="${PACKAGE}-init.el"
  7. if [ "X${FLAVOR}" = "X" ]; then
  8. echo Need argument to determin FLAVOR of emacs;
  9. exit 1
  10. fi
  11. if [ "X${PACKAGE}" = "X" ]; then
  12. echo Internal error: need package name;
  13. exit 1;
  14. fi
  15. ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
  16. case "${FLAVOR}" in
  17. emacs)
  18. ;;
  19. xemacs*)
  20. ;;
  21. *)
  22. echo -n "remove/${PACKAGE}: Handling removal of emacsen flavor ${FLAVOR} ..."
  23. rm -rf ${ELCDIR}
  24. rm -f ${STARTDIR}/95${STARTFILE}*
  25. echo " done."
  26. ;;
  27. esac
  28. exit 0