source: projects/specs/trunk/g/git/git-install.sh @ 2062

Revision 2062, 1.1 KB checked in by iwaim, 14 years ago (diff)

git 1.7.3.1-1

  • Property svn:executable set to *
Line 
1#! /bin/sh -e
2#  /usr/lib/emacsen-common/packages/install/git
3
4set -e
5
6FLAVOR=$1
7PACKAGE="git"
8
9SOURCES="git.el git-blame.el"
10
11if [ "X${FLAVOR}" = "X" ]; then
12    echo Need argument to determin FLAVOR of emacs;
13    exit 1
14fi
15
16if [ "X${PACKAGE}" = "X" ]; then
17    echo Internal error: need package name;
18    exit 1;
19fi
20
21ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
22ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
23
24STARTDIR=/etc/${FLAVOR}/site-start.d
25STARTFILE="${PACKAGE}-init.el";
26
27case "${FLAVOR}" in
28    emacs|emacs19|mule)
29        ;;
30    *)
31        echo -n "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ..."
32        rm -rf ${ELCDIR}
33        install -m 755 -d ${ELCDIR}
34
35        # Copy the temp .el files
36        cp -a ${ELDIR}/* ${ELCDIR}/
37
38        # Byte compile them
39        (cd ${ELCDIR}
40            ${FLAVOR} -batch -q -no-site-file \
41                      -f batch-byte-compile ${SOURCES} > CompilationLog 2>&1
42            rm -f ${SOURCES}
43        )
44        gzip -9 ${ELCDIR}/CompilationLog
45        ln -sf ${ELDIR}/${STARTFILE} ${STARTDIR}/55${STARTFILE}
46        echo " done."
47        #
48        ;;
49esac
50
51exit 0;
Note: See TracBrowser for help on using the repository browser.