git-install.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #! /bin/sh -e
  2. # /usr/lib/emacsen-common/packages/install/git
  3. set -e
  4. FLAVOR=$1
  5. PACKAGE="git"
  6. SOURCES="git.el git-blame.el"
  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. case "${FLAVOR}" in
  20. emacs|emacs19|mule)
  21. ;;
  22. *)
  23. echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
  24. rm -rf ${ELCDIR}
  25. install -m 755 -d ${ELCDIR}
  26. # Copy the temp .el files
  27. cp -a ${ELDIR}/* ${ELCDIR}/
  28. # Byte compile them
  29. (cd ${ELCDIR}
  30. ${FLAVOR} -batch -q -no-site-file \
  31. -f batch-byte-compile ${SOURCES} > CompilationLog 2>&1
  32. rm -f ${SOURCES}
  33. )
  34. gzip -9 ${ELCDIR}/CompilationLog
  35. ln -sf ${ELDIR}/${STARTFILE} ${STARTDIR}/55${STARTFILE}
  36. echo " done."
  37. #
  38. ;;
  39. esac
  40. exit 0;