xdvik-install.sh 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #! /bin/sh -e
  2. # /usr/lib/emacsen-common/packages/install/xdvik
  3. # [ This particular script hasn't been tested, so be careful. ]
  4. set -e
  5. FLAVOR=$1
  6. PACKAGE="xdvik"
  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. *)
  22. echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
  23. rm -rf ${ELCDIR}
  24. install -m 755 -d ${ELCDIR}
  25. # Byte compile them
  26. ${FLAVOR} -batch -f batch-byte-compile ${ELDIR}/xdvi-search.el \
  27. >> ${ELCDIR}/CompilationLog 2>&1
  28. cp ${ELDIR}/xdvi-search.elc ${ELCDIR}
  29. gzip -9 ${ELCDIR}/CompilationLog
  30. rm -f ${ELDIR}/*.elc
  31. rm -f ${ELCDIR}/*.el
  32. ln -f -s ${ELDIR}/${STARTFILE} ${STARTDIR}/60${STARTFILE};
  33. echo " done."
  34. ;;
  35. esac
  36. exit 0;