rustc/debian/rust-mode.emacsen-install
2015-02-13 15:10:11 +01:00

21 lines
489 B
Bash
Executable File

#!/bin/sh -e
FLAVOR=$1
PACKAGE=rust-mode
ELDIR=/usr/share/emacs/site-lisp/
ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
ELFILE="rust-mode.el"
FLAGS="-batch -no-site-file -f batch-byte-compile"
if [ ${FLAVOR} != emacs ]; then
echo install/${PACKAGE}: Byte-compiling for ${FLAVOR}
install -m 755 -d ${ELCDIR}
# Source file symlink (emacsen policy 5C)
ln -s "${ELDIR}/${ELFILE}" "${ELCDIR}/${ELFILE}"
# Compile
(cd ${ELCDIR}; ${FLAVOR} ${FLAGS} ${ELFILE})
fi