skk-remove.sh 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/bin/sh
  2. # /usr/lib/emacsen-common/packages/remove/skk
  3. # [ This particular script hasn't been tested either, so be careful. ]
  4. set -e
  5. FLAVOR=$1
  6. PACKAGE="skk"
  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. ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
  16. ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
  17. STARTDIR=/etc/${FLAVOR}/site-start.d
  18. STARTFILE="${PACKAGE}-init.el";
  19. SITELISP=/usr/share/${FLAVOR}/site-lisp
  20. EMACSTUTDIR=/usr/share/skk
  21. XEMACSTUTDIR=/usr/share/${FLAVOR}/etc/${PACKAGE}
  22. NICOLAELCDIR=/usr/share/${FLAVOR}/site-lisp/nicola-ddskk
  23. case "${FLAVOR}" in
  24. emacs)
  25. ;;
  26. xemacs-*)
  27. if [ -d ${ELCDIR} ]; then
  28. echo -n "remove/${PACKAGE}: Handling removal of emacsen flavor ${FLAVOR} ..."
  29. rm -rf ${ELCDIR}
  30. rm -rf ${NICOLAELCDIR}
  31. rm -rf ${XEMACSTUTDIR}
  32. echo " done."
  33. fi
  34. ;;
  35. *)
  36. if [ -d ${ELCDIR} ]; then
  37. echo -n "remove/${PACKAGE}: Handling removal of emacsen flavor ${FLAVOR} ..."
  38. rm -rf ${ELCDIR}
  39. rm -rf ${NICOLAELCDIR}
  40. rm -f ${EMACSTUTDIR}/*.tut*
  41. echo " done."
  42. fi
  43. ;;
  44. esac
  45. rm -f ${STARTDIR}/70${STARTFILE}*;
  46. exit 0;