File: install

package info (click to toggle)
zenirc 2.112-4
  • links: PTS
  • area: main
  • in suites: slink
  • size: 1,116 kB
  • ctags: 770
  • sloc: lisp: 5,806; sh: 217; makefile: 200
file content (27 lines) | stat: -rw-r--r-- 845 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
#!/bin/sh

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

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

if [ ${FLAVOR} != emacs ]; then
    echo install/zenirc: byte-compiling for ${FLAVOR}

    [ -d ${elc_dir} ] || mkdir ${elc_dir}

    # Copy the temp .el files
    (cd ${el_dir}; cp ${el_files} ${elc_dir})

    # Byte compile them
    (cd ${elc_dir}; ${FLAVOR} ${byte_compile_options} ${el_files} 2> /dev/null )
    (cd ${elc_dir}; for f in ${el_files}; do if [ ! -f ${f}c ]; then echo "Failed $f"; fi; done )

    # remove the redundant .el files
    # presumes that any .el files in the <flavor> dir are trash.
    (cd ${elc_dir}; rm -f ${el_files} )
fi
exit 0