IIIMECF-install.sh 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #! /bin/sh -e
  2. # /usr/lib/emacsen-common/packages/install/foo
  3. # [ This particular script hasn't been tested, so be careful. ]
  4. set -e
  5. FLAVOR=$1
  6. VERSION="0.6"
  7. PACKAGE="IIIMECF"
  8. if [ "X${FLAVOR}" = "X" ]; then
  9. echo Need argument to determin FLAVOR of emacs;
  10. exit 1
  11. fi
  12. if [ "X${PACKAGE}" = "X" ]; then
  13. echo Internal error: need package name;
  14. exit 1;
  15. fi
  16. ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
  17. ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
  18. if [ ! -x "$ELCDIR" ] ; then
  19. mkdir -p "$ELCDIR"
  20. fi
  21. STARTDIR=/etc/${FLAVOR}/site-start.d
  22. STARTFILE="${PACKAGE}-init.el";
  23. SITELISP=/usr/share/${FLAVOR}/site-lisp
  24. STAMP=${ELCDIR}/compile-stamp
  25. case "${FLAVOR}" in
  26. emacs)
  27. ;;
  28. xemacs-21.1.14)
  29. echo "Not Supported in this."
  30. ;;
  31. # emacs20|emacs21|xemacs21)
  32. *)
  33. echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
  34. if [ -e ${STAMP} ]; then
  35. if [ "${VERSION}" = "`cat ${STAMP}`" ]; then
  36. echo " exited. (already compiled)"
  37. exit
  38. else
  39. rm -f ${STAMP}
  40. fi
  41. fi
  42. rm -rf ${ELCDIR}
  43. install -m 755 -d ${ELCDIR}
  44. # Byte compile them
  45. (cd ${ELDIR}
  46. ${FLAVOR} -q --no-site-file -batch -l iiimcf-comp.el > ${ELCDIR}/CompilationLog 2>&1
  47. )
  48. mv ${ELDIR}/lisp/*.elc ${ELCDIR}/
  49. gzip -9 ${ELCDIR}/CompilationLog
  50. echo ${VERSION} > ${STAMP}
  51. install -p -m644 ${ELDIR}/vine-default-${PACKAGE}.el ${ELCDIR}
  52. ln -sf ${ELDIR}/${STARTFILE} ${STARTDIR}/40${STARTFILE};
  53. echo " done."
  54. ;;
  55. *)
  56. ;;
  57. esac
  58. exit 0;