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

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

html-helper-mode 2.19.1.1-7

  • 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";
25VDELFILE="vine-default-${PACKAGE}.el"
26
27SITELISP=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
28
29#EFLAGS="-batch -q"
30EFLAGS="-batch -l HHM-MK"
31COMPILE="-batch -q -f batch-byte-compile"
32
33case "${FLAVOR}" in
34        emacs|emacs19)
35        ;;
36        *)
37
38        echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
39#       if [ "${FLAVOR}" = "mule2" ]; then
40#               if [ ! -d /usr/share/emacs/site-lisp/clime ]; then
41#               echo " exited."
42#               echo "W: Please install \`clime' package for mule2." ;
43#               exit 0;
44#               fi
45#       else
46#               if [ ! -d /usr/share/emacs/site-lisp/flim ]; then
47#               echo " exited."
48#               echo "W: Please install \`flim' package for ${FLAVOR}." ;
49#               exit 0;
50#               fi
51#       fi
52
53        rm -rf ${ELCDIR}
54    install -m 755 -d ${ELCDIR}
55
56    # Byte compile
57    (cd ${ELDIR}
58        ${FLAVOR} ${EFLAGS}   > ${ELCDIR}/CompilationLog 2>&1
59        install -m0644 *.elc ${ELCDIR} > ${ELCDIR}/CompilationLog 2>&1
60        rm -f *.elc           > ${ELCDIR}/CompilationLog 2>&1
61        rm -f ${ELCDIR}/*.el
62        install -m0644 ${VDELFILE} ${ELCDIR} > ${ELCDIR}/CompilationLog 2>&1
63    )
64
65        gzip -9 ${ELCDIR}/CompilationLog
66
67        ln -sf ${ELDIR}/${STARTFILE} ${STARTDIR}/75${STARTFILE};
68        echo " done."
69        ;;
70esac
71
72exit 0;
Note: See TracBrowser for help on using the repository browser.