auto-complete-install.sh 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #! /bin/sh -e
  2. # /usr/lib/emacsen-common/packages/install/auto-complete
  3. ##set -x
  4. FLAVOR=$1
  5. PACKAGE=auto-complete
  6. FLAGS="-Q -L . -batch -f batch-byte-compile"
  7. ELDIR="/usr/share/emacs/site-lisp/${PACKAGE}"
  8. ELCDIR="/usr/share/${FLAVOR}/site-lisp/${PACKAGE}"
  9. STARTDIR=/etc/${FLAVOR}/site-start.d
  10. STARTFILE="${PACKAGE}-init.el"
  11. SOURCES="auto-complete-config.el auto-complete.el fuzzy.el popup.el"
  12. AC_DICT="ac-dict"
  13. case "${FLAVOR}" in
  14. *)
  15. echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
  16. install -m 755 -d ${ELCDIR}
  17. cd ${ELDIR}
  18. cp *.el ${ELCDIR}
  19. sed -e "s|@@FLAVOR@@|${FLAVOR}|g" vine-default-${PACKAGE}.el.in > ${ELCDIR}/vine-default-${PACKAGE}.el
  20. rm -rf ${ELCDIR}/${AC_DICT}
  21. cp -ra ${AC_DICT} ${ELCDIR}/
  22. FILES="${SOURCES}"
  23. cd ${ELCDIR}
  24. ${FLAVOR} ${FLAGS} ${FILES} > ${ELCDIR}/CompilationLog 2>&1
  25. rm -f ${SOURCES}
  26. gzip -9 ${ELCDIR}/CompilationLog
  27. rm -f ${PACKAGE}-init.{el,elc}
  28. rm -f vine-default-${PACKAGE}.elc
  29. ln -sf ${ELDIR}/${STARTFILE} ${STARTDIR}/95${STARTFILE};
  30. echo " done."
  31. ;;
  32. esac
  33. exit 0 ;