js2-mode-install.sh 758 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #! /bin/sh -e
  2. # /usr/lib/emacsen-common/packages/install/js2-mode
  3. FLAVOR=$1
  4. PACKAGE=js2-mode
  5. FLAGS="${SITEFLAG} -q -batch -f batch-byte-compile"
  6. ELDIR="/usr/share/emacs/site-lisp/${PACKAGE}"
  7. ELCDIR="/usr/share/${FLAVOR}/site-lisp/${PACKAGE}"
  8. STARTDIR=/etc/${FLAVOR}/site-start.d
  9. STARTFILE="${PACKAGE}-init.el"
  10. SOURCES="js2.el"
  11. case "${FLAVOR}" in
  12. emacs)
  13. ;;
  14. xemacs*)
  15. ;;
  16. *)
  17. echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
  18. install -m 755 -d ${ELCDIR}
  19. cd ${ELDIR}
  20. cp *.el ${ELCDIR}
  21. FILES="${SOURCES}"
  22. cd ${ELCDIR}
  23. ${FLAVOR} ${FLAGS} ${FILES} > ${ELCDIR}/CompilationLog 2>&1
  24. rm -f ${SOURCES}
  25. gzip -9 ${ELCDIR}/CompilationLog
  26. ln -sf ${ELDIR}/${STARTFILE} ${STARTDIR}/95${STARTFILE};
  27. echo " done."
  28. ;;
  29. esac
  30. exit 0 ;