migration from private to rsa
[external/bash.git] / debian / bashdb.emacsen-install
1 #! /bin/sh -e
2 # /usr/lib/emacsen-common/packages/install/bashdb
3
4 # Written by Jim Van Zandt <jrv@vanzandt.mv.com>, borrowing heavily
5 # from the install scripts for gettext by Santiago Vila
6 # <sanvila@ctv.es> and octave by Dirk Eddelbuettel <edd@debian.org>.
7
8 FLAVOR=$1
9 PACKAGE=bashdb
10
11 if [ ${FLAVOR} = emacs ]; then exit 0; fi
12
13 # bashdb's gud.el doesn't support emacs20
14 if [ ${FLAVOR} = emacs20 ]; then exit 0; fi
15
16 FILES="bashdb.el gud.el"
17
18 echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
19
20 #FLAVORTEST=`echo $FLAVOR | cut -c-6`
21 #if [ ${FLAVORTEST} = xemacs ] ; then
22 #    SITEFLAG="-no-site-file"
23 #else
24 #    SITEFLAG="--no-site-file"
25 #fi
26 FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
27
28 ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
29 ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
30
31 # Install-info-altdir does not actually exist.
32 # Maybe somebody will write it.
33 if test -x /usr/sbin/install-info-altdir; then
34     echo install/${PACKAGE}: install Info links for ${FLAVOR}
35     install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} \
36         /usr/share/info/${PACKAGE}.info.gz
37 fi
38
39 install -m 755 -d ${ELCDIR}
40 cd ${ELDIR}
41 cp ${FILES} ${ELCDIR}
42 cd ${ELCDIR}
43
44 cat << EOF > path.el
45 (setq load-path (cons "." load-path) byte-compile-warnings nil)
46 EOF
47 ${FLAVOR} ${FLAGS} ${FILES}
48 rm -f *.el path.el
49
50 exit 0