source: projects/specs/trunk/h/html-helper-mode/html-helper-mode-install.sh @ 775

Revision 775, 1.6 KB checked in by iwaim, 14 years ago (diff)

update: html-helper-mode 2.19.1.1-6

  • Property svn:executable set to *
Line 
1#! /bin/sh -e
2#  /usr/lib/emacsen-common/packages/install/foo
3# [ This particular script hasn't been tested, so be careful. ]
4
5set -e
6
7FLAVOR=$1
8PACKAGE="html-helper-mode"
9
10if [ "X${FLAVOR}" = "X" ]; then
11    echo Need argument to determin FLAVOR of emacs;
12    exit 1
13fi
14
15if [ "X${PACKAGE}" = "X" ]; then
16    echo Internal error: need package name;
17    exit 1;
18fi
19
20ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
21ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
22
23STARTDIR=/etc/${FLAVOR}/site-start.d
24STARTFILE="${PACKAGE}-init.el";
25
26SITELISP=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
27
28#EFLAGS="-batch -q"
29EFLAGS="-batch -l HHM-MK"
30COMPILE="-batch -q -f batch-byte-compile"
31
32case "${FLAVOR}" in
33        emacs|emacs19)
34        ;;
35        *)
36
37        echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
38#       if [ "${FLAVOR}" = "mule2" ]; then
39#               if [ ! -d /usr/share/emacs/site-lisp/clime ]; then
40#               echo " exited."
41#               echo "W: Please install \`clime' package for mule2." ;
42#               exit 0;
43#               fi
44#       else
45#               if [ ! -d /usr/share/emacs/site-lisp/flim ]; then
46#               echo " exited."
47#               echo "W: Please install \`flim' package for ${FLAVOR}." ;
48#               exit 0;
49#               fi
50#       fi
51
52        rm -rf ${ELCDIR}
53    install -m 755 -d ${ELCDIR}
54
55    # Byte compile
56    (cd ${ELDIR}
57        ${FLAVOR} ${EFLAGS}   > ${ELCDIR}/CompilationLog 2>&1
58        install -m0644 *.elc /usr/share/${FLAVOR}/site-lisp/${PACKAGE} \
59                              > ${ELCDIR}/CompilationLog 2>&1
60        rm -f *.elc           > ${ELCDIR}/CompilationLog 2>&1
61        rm -f ${ELCDIR}/*.el
62    )
63
64        gzip -9 ${ELCDIR}/CompilationLog
65
66        ln -sf ${ELDIR}/${STARTFILE} ${STARTDIR}/75${STARTFILE};
67        echo " done."
68        ;;
69esac
70
71exit 0;
Note: See TracBrowser for help on using the repository browser.