git-install.sh 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #! /bin/sh -e
  2. # /usr/lib/emacsen-common/packages/install/git
  3. set -e
  4. FLAVOR=$1
  5. PACKAGE="git"
  6. if [ "X${FLAVOR}" = "X" ]; then
  7. echo Need argument to determin FLAVOR of emacs;
  8. exit 1
  9. fi
  10. if [ "X${PACKAGE}" = "X" ]; then
  11. echo Internal error: need package name;
  12. exit 1;
  13. fi
  14. ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
  15. ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
  16. STARTDIR=/etc/${FLAVOR}/site-start.d
  17. STARTFILE="${PACKAGE}-init.el";
  18. case "${FLAVOR}" in
  19. emacs|emacs19|mule)
  20. ;;
  21. *)
  22. echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
  23. rm -rf ${ELCDIR}
  24. install -m 755 -d ${ELCDIR}
  25. # Copy the temp .el files
  26. cp -a ${ELDIR}/* ${ELCDIR}/
  27. # Byte compile them
  28. (cd ${ELCDIR}
  29. ${FLAVOR} -batch -q -no-site-file \
  30. -f batch-byte-compile *.el > CompilationLog 2>&1
  31. rm -f *.el
  32. )
  33. gzip -9 ${ELCDIR}/CompilationLog
  34. cp -a ${ELDIR}/${STARTFILE} ${STARTDIR}/55${STARTFILE}
  35. echo " done."
  36. #
  37. ;;
  38. esac
  39. exit 0;