lua-mode-install.sh 825 B

12345678910111213141516171819202122232425262728293031323334
  1. #! /bin/sh -e
  2. # /usr/lib/emacsen-common/packages/install/lua-mode
  3. FLAVOR=$1
  4. PACKAGE=lua-mode
  5. FLAGS="--no-site-file -q -batch -l ./lua-mode.el -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="lua-mode.el"
  11. case "${FLAVOR}" in
  12. *)
  13. echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
  14. install -m 755 -d ${ELCDIR}
  15. cd ${ELDIR}
  16. cp *.el ${ELCDIR}
  17. FILES="${SOURCES}"
  18. cd ${ELCDIR}
  19. ## do not byte-compile lua-mode.el
  20. ${FLAVOR} ${FLAGS} ${FILES} > ${ELCDIR}/CompilationLog 2>&1
  21. rm -f ${SOURCES}
  22. gzip -9 ${ELCDIR}/CompilationLog
  23. ln -sf ${ELDIR}/${STARTFILE} ${STARTDIR}/95${STARTFILE};
  24. echo " done."
  25. ;;
  26. esac
  27. exit 0 ;