html-helper-mode-install.sh 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. PACKAGE="html-helper-mode"
  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. VDELFILE="vine-default-${PACKAGE}.el"
  20. SITELISP=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
  21. #EFLAGS="-batch -q"
  22. EFLAGS="-batch -l HHM-MK"
  23. COMPILE="-batch -q -f batch-byte-compile"
  24. case "${FLAVOR}" in
  25. emacs|emacs19)
  26. ;;
  27. *)
  28. echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
  29. # if [ "${FLAVOR}" = "mule2" ]; then
  30. # if [ ! -d /usr/share/emacs/site-lisp/clime ]; then
  31. # echo " exited."
  32. # echo "W: Please install \`clime' package for mule2." ;
  33. # exit 0;
  34. # fi
  35. # else
  36. # if [ ! -d /usr/share/emacs/site-lisp/flim ]; then
  37. # echo " exited."
  38. # echo "W: Please install \`flim' package for ${FLAVOR}." ;
  39. # exit 0;
  40. # fi
  41. # fi
  42. rm -rf ${ELCDIR}
  43. install -m 755 -d ${ELCDIR}
  44. # Byte compile
  45. (cd ${ELDIR}
  46. ${FLAVOR} ${EFLAGS} > ${ELCDIR}/CompilationLog 2>&1
  47. install -m0644 *.elc ${ELCDIR} > ${ELCDIR}/CompilationLog 2>&1
  48. rm -f *.elc > ${ELCDIR}/CompilationLog 2>&1
  49. rm -f ${ELCDIR}/*.el
  50. install -m0644 ${VDELFILE} ${ELCDIR} > ${ELCDIR}/CompilationLog 2>&1
  51. )
  52. gzip -9 ${ELCDIR}/CompilationLog
  53. ln -sf ${ELDIR}/${STARTFILE} ${STARTDIR}/75${STARTFILE};
  54. echo " done."
  55. ;;
  56. esac
  57. exit 0;