1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
#!/bin/sh -eu
FLAVOR="$1"
echo "install/cdargs: Handling install of emacsen flavor $FLAVOR"
byte_compile_options="-batch -f batch-byte-compile"
el_file="cdargs.el"
el_dir="/usr/share/emacs/site-lisp"
elc_dir="/usr/share/$FLAVOR/site-lisp"
if [ "$FLAVOR" != emacs ]
then
echo "install/cdargs: byte-compiling for $FLAVOR"
# Create symlinks to the .el files (debian-emacs policy section 5E)
( cd "$elc_dir" && ln -sf "$el_dir/$el_file" "$el_file" )
# Byte compile them
"$FLAVOR" $byte_compile_options "$elc_dir/$el_file" > /dev/null 2>&1
fi
exit 0
|