File: magit.emacsen-install

package info (click to toggle)
magit 0.7-1.1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 908 kB
  • ctags: 630
  • sloc: lisp: 5,023; sh: 641; makefile: 32
file content (26 lines) | stat: -rw-r--r-- 567 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
22
23
24
25
26
#!/bin/sh -eu

# cripped from the cdargs package.

FLAVOR="$1"

byte_compile_options="-batch -f batch-byte-compile"
el_file="magit.el" 
el_dir="/usr/share/emacs/site-lisp"
elc_dir="/usr/share/$FLAVOR/site-lisp"

if [ "$FLAVOR" != emacs ]
then
    echo "install/magit: 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