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

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

migemo 0.40-5

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