tamago-tsunagi-install.sh 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #! /bin/sh -e
  2. # /usr/lib/emacsen-common/packages/install/tamago-tsunagi
  3. # [ This particular script hasn't been tested, so be careful. ]
  4. set -e
  5. FLAVOR=$1
  6. PACKAGE="tamago-tsunagi"
  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. case "${FLAVOR}" in
  21. emacs-2*)
  22. echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
  23. rm -rf ${ELCDIR}
  24. install -m 755 -d ${ELCDIR}
  25. cp -a ${ELDIR}/* ${ELCDIR}
  26. # Byte compile
  27. (
  28. cd ${ELCDIR}
  29. make > ${ELCDIR}/CompilationLog 2>&1
  30. rm -f its/*.el
  31. rm -f egg/*.el
  32. rm -f egg*.el
  33. rm -f its.el
  34. rm -f leim-list.el
  35. rm -f menudiag.el
  36. rm -f docomp.el
  37. rm -f Makefile
  38. )
  39. gzip -9 ${ELCDIR}/CompilationLog
  40. install -p -m644 ${ELDIR}/vine-default-${PACKAGE}.el ${ELCDIR}
  41. ln -sf ${ELDIR}/${STARTFILE} ${STARTDIR}/50${STARTFILE}
  42. echo " done."
  43. ;;
  44. *)
  45. ;;
  46. esac
  47. exit 0;