Debian Codegraph @

debian/emacsen-install

raw
1 #! /bin/sh -e
2 # /usr/lib/emacsen-common/packages/install/ratpoison
3
4 # Written by Jim Van Zandt <[email protected]>, borrowing heavily
5 # from the install scripts for gettext by Santiago Vila
6 # <[email protected]> and octave by Dirk Eddelbuettel <[email protected]>.
7 # modified for ratpoison by Bernhard R. Link <[email protected]>
8
9 FLAVOR="$1"
10 PACKAGE=ratpoison
11 ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
12 ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
13 FILES=ratpoison-cmd.el
14
15 if [ ${FLAVOR} = emacs ]; then
16 exit 0
17 fi
18 for file in ${FILES} ; do
19 if [ ! -f ${ELDIR}/${file} ]; then
20 echo "Warning: missing file ${ELDIR}/${file}!" >&2
21 exit 0
22 fi
23 done
24
25 echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
26
27 FLAVORTEST=`echo $FLAVOR | cut -c-6`
28 if [ ${FLAVORTEST} = xemacs ] ; then
29 SITEFLAG="-no-site-file"
30 else
31 SITEFLAG="--no-site-file"
32 fi
33 FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
34
35 install -m 755 -d ${ELCDIR}
36 cd ${ELDIR}
37 cp ${FILES} ${ELCDIR}
38 cd ${ELCDIR}
39
40 cat << EOF > path.el
41 (setq load-path (cons "." load-path) byte-compile-warnings nil)
42 EOF
43 ${FLAVOR} ${FLAGS} ${FILES}
44 rm -f *.el path.el
45
46 exit 0