File: emacsen-install

package info (click to toggle)
edb 1.21-9
  • links: PTS
  • area: main
  • in suites: potato
  • size: 952 kB
  • ctags: 1,111
  • sloc: lisp: 10,076; makefile: 140; sh: 40
file content (34 lines) | stat: -rw-r--r-- 986 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
27
28
29
30
31
32
33
34
#! /bin/sh -e

FLAVOR=$1
PACKAGE=edb

echo install/${PACKAGE}: Handling install of emacsen flavor ${FLAVOR}

ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}/
ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}/

case ${FLAVOR} in
    emacs)
        echo install/${PACKAGE}: Ignoring emacsen flavor ${FLAVOR};;
    *)
        echo -n install/${PACKAGE}: Byte-compiling for ${FLAVOR} ...
        install -m 755 -d ${ELCDIR}
    
        (
            cd ${ELDIR}
            echo '(setq load-path (cons "." load-path))' > BYTE-COMPILE.el 
            echo '(setq edb-directory ".")' >> BYTE-COMPILE.el 
            ${FLAVOR} -batch -no-site-file \
                -l ./BYTE-COMPILE.el -l database.el \
                -f byte-compile-database-all \
                -f batch-byte-compile database.el
            ${FLAVOR} -batch -no-site-file -f batch-byte-compile edb-fixes-1.21.el

            rm BYTE-COMPILE.el
            mv -f *.elc ${ELCDIR}
        )
        echo " done.";;
esac

exit 0