source: projects/specs/trunk/m/migemo/migemo-install.sh @ 7231

Revision 7231, 1.5 KB checked in by iwaim, 11 years ago (diff)

migemo 0.40-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="migemo"
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
28FLAGS="${SITEFLAG} -q -batch -f batch-byte-compile"
29
30SOURCES="migemo.el"
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        # Byte compile
53        cd ${ELDIR}
54        rm -rf ${ELCDIR}
55        install -m 755 -d ${ELCDIR}
56        cp ${SOURCES} ${ELCDIR}
57        FILES="${SOURCES}"
58        cd ${ELCDIR}
59        ${FLAVOR} ${FLAGS} ${FILES} > ${ELCDIR}/CompilationLog 2>&1
60        rm -f ${SOURCES}
61        gzip -9 ${ELCDIR}/CompilationLog
62
63        install -p -m644 ${ELDIR}/vine-default-${PACKAGE}.el ${ELCDIR}
64        ln -sf ${ELDIR}/${STARTFILE} ${STARTDIR}/90${STARTFILE}
65
66        echo " done."
67        ;;
68esac
69
70exit 0;
71
Note: See TracBrowser for help on using the repository browser.