File: cdargs.emacsen-install

package info (click to toggle)
cdargs 1.35-9
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 636 kB
  • sloc: cpp: 1,177; sh: 493; lisp: 70; makefile: 14; csh: 3
file content (25 lines) | stat: -rw-r--r-- 599 bytes parent folder | download | duplicates (4)
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