File: install

package info (click to toggle)
elib 1.0-8
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 336 kB
  • ctags: 263
  • sloc: lisp: 2,378; makefile: 102; sh: 51
file content (35 lines) | stat: -rw-r--r-- 963 bytes parent folder | download | duplicates (2)
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
35
#!/bin/sh
# /usr/lib/emacsen-common/packages/install/elib
set -e

FLAVOR=$1
echo install/elib: Handling install of emacsen flavor ${FLAVOR}

byte_compile_options="-batch -f batch-byte-compile"
el_files="`cd /usr/share/emacs/site-lisp/elib; echo *.el`"
el_dir=/usr/share/emacs/site-lisp/elib/
elc_dir=/usr/share/${FLAVOR}/site-lisp/elib/

if [ ${FLAVOR} != emacs ]; then
    echo install/elib: install Info links for ${FLAVOR}
    if test -x /usr/sbin/install-info-altdir; then
	install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/elib.info.gz
    fi

    echo install/elib: byte-compiling for ${FLAVOR}
	    
    rm -rf ${elc_dir}
    mkdir -p ${elc_dir}
    cp ${el_dir}/* ${elc_dir}
    cd ${elc_dir}
    make EMACS=${FLAVOR} ELIBDIR=${elc_dir} elcfiles elib-startup.el
    mv -f elib-startup.el /etc/${FLAVOR}/site-start.d/35elib-startup.el

    rm Makefile
    for d in *.el; do
	if test -f ${d}c; then
	    rm $d
	fi
    done
fi
exit 0