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
|
#!/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"
# Copy the temp .el files
trap "rm -f \"$elc_dir/$el_file\"" 0
cp "$el_dir/$el_file" "$elc_dir/$el_file"
# Byte compile them
"$FLAVOR" $byte_compile_options "$elc_dir/$el_file" > /dev/null 2>&1
rm -f "$elc_dir/$el_file"
trap "" 0
fi
exit 0
|