File: yatex.emacsen-install

package info (click to toggle)
yatex 1.82-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 2,072 kB
  • sloc: lisp: 15,155; makefile: 194; ruby: 92; sh: 76
file content (57 lines) | stat: -rw-r--r-- 1,466 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash -e
#
# Copyright(c)1998 Hidenobu NABETANI <nabe@debian.or.jp>
# Copyright(c)2003 INOUE Hiroyuki <dombly@kc4.so-net.ne.jp>
#
# License: GPL2
# This program is written for Debian GNU/Linux YaTeX package.


abort_install() {
    echo "Byte compile for ${FLAVOR} failed."
    echo "Please check /usr/share/${FLAVOR}/site-lisp/${PACKAGE}/CompilationLog.gz"
    echo
    exit 1
}

PACKAGE=yatex
FLAVOR=$1
case $FLAVOR in
    *xemacs*|emacs2[0123]|emacs19|mule2)
    exit 0
    ;;
esac

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

byte_compile_options="-batch -no-site-file -no-init-file"

# don't byte-compile yatex19.el 
LISP="comment.el yatex.el yatexadd.el yatexgen.el yatexenv.el \
    yatexlib.el yatexprc.el \
    yatexmth.el yatexhks.el yatexhlp.el \
    yatexm-o.el yatexsec.el  yatexhie.el yahtml.el yatexpkg.el"

if [ ${FLAVOR} != emacs ]
    then
    echo install/${PACKAGE}: Byte-compiling for ${FLAVOR}...

    install -m 755 -d ${ELCDIR}
    # link .el files
    ln -sf ${ELDIR}/*.el ${ELCDIR}

    # Byte compile them
    echo '(setq load-path (cons "." load-path))' >  ${ELCDIR}/lp.el
    echo '(load-file "./yatexlib.el")'           >> ${ELCDIR}/lp.el
    (cd ${ELCDIR} && ${FLAVOR} ${byte_compile_options} -l ./lp.el \
	-e bcf-and-exit ${LISP} 2>&1 | gzip -9qf > $LOG.gz) || abort_install
    echo "done."
fi

exit 0

### Local Variables:
### mode: shell-script
### End: