File: cdargs.emacsen-install

package info (click to toggle)
cdargs 1.35-10
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 724 kB
  • ctags: 398
  • sloc: cpp: 1,185; sh: 491; lisp: 70; makefile: 14; csh: 3
file content (21 lines) | stat: -rw-r--r-- 571 bytes parent folder | download
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