1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
#!/bin/sh
# /usr/lib/emacsen-common/packages/install/debview
# [ This particular script hasn't been tested, so be careful. ]
set -e
FLAVOR=$1
echo install/debview: Handling install of emacsen flavor ${FLAVOR}
byte_compile_options="-batch -f batch-byte-compile"
el_file=deb-view.el
el_dir=/usr/share/emacs/site-lisp/debview
elc_dir=/usr/share/${FLAVOR}/site-lisp/debview
if [ ${FLAVOR} != emacs ]; then
echo install/debview: byte-compiling for ${FLAVOR}
# Copy the temp .el file
mkdir -p ${elc_dir}
cp ${el_dir}/${el_file} ${elc_dir}
# Byte compile them
LOG=`tempfile`
${FLAVOR} ${byte_compile_options} ${elc_dir}/${el_file} >$LOG 2>&1
mv $LOG ${elc_dir}/install.log
echo "Compilation log for ${FLAVOR} saved to ${elc_dir}/install.log"
# remove the redundant .el files
# presumes that any .el files in the <flavor> dir are trash.
rm ${elc_dir}/*.el
fi
exit 0
|