File: install

package info (click to toggle)
debview 1.4-6
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 76 kB
  • ctags: 15
  • sloc: lisp: 212; sh: 65; makefile: 20
file content (28 lines) | stat: -rwxr-xr-x 779 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
#!/bin/sh
# /usr/lib/emacsen-common/packages/install/debview
# [ This particular script hasn't been tested, so be careful. ]
set -e

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

byte_compile_options="-batch -f batch-byte-compile"
el_file=deb-view.el
el_dir=/usr/share/emacs/site-lisp/debview
elc_dir=/usr/share/${FLAVOR}/site-lisp/debview

if [ ${FLAVOR} != emacs ]; then
    echo install/debview: byte-compiling for ${FLAVOR}
	    
    # Copy the temp .el file
    mkdir -p ${elc_dir}
    cp ${el_dir}/${el_file} ${elc_dir}

    # Byte compile them
    ${FLAVOR} ${byte_compile_options} ${elc_dir}/${el_file}

    # remove the redundant .el files
    # presumes that any .el files in the <flavor> dir are trash.
    rm ${elc_dir}/*.el
fi
exit 0