emacsen-common-install 553 B

12345678910111213141516171819202122232425
  1. #!/bin/sh
  2. set -e
  3. FLAVOR=$1
  4. PACKAGE=dpkg-dev
  5. ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
  6. ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
  7. files="debian-changelog-mode.el"
  8. flags="-batch --no-site-file -l path.el -f batch-byte-compile"
  9. if [ ${FLAVOR} != emacs ]; then
  10. echo install/${PACKAGE}: Byte-compiling for ${FLAVOR}
  11. install -m 755 -d ${ELCDIR}
  12. cd ${ELDIR}
  13. cp ${files} ${ELCDIR}
  14. cd ${ELCDIR}
  15. cat << EOF > path.el
  16. (setq load-path (cons "." load-path) byte-compile-warnings nil)
  17. EOF
  18. ${FLAVOR} ${flags} ${files}
  19. rm -f *.el path.el
  20. fi