File: mmm-mode.emacsen-install

package info (click to toggle)
mmm-mode 0.5.11-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 540 kB
  • sloc: lisp: 3,712; makefile: 71; sh: 33
file content (35 lines) | stat: -rw-r--r-- 1,134 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh -e

FILES="mmm-auto.el mmm-class.el mmm-cmds.el mmm-compat.el mmm-cweb.el mmm-defaults.el mmm-erb.el mmm-mason.el mmm-mode.el mmm-myghty.el mmm-noweb.el mmm-region.el mmm-rpm.el mmm-sample.el mmm-univ.el mmm-utils.el mmm-vars.el"

FLAVOR="$1"
FLAVORTEST=`echo $FLAVOR | cut -c-6`

if [ "$FLAVORTEST" = "xemacs" ]; then
    echo "Sorry, XEmacs is no longer supported."
    exit 0
fi

echo "install/mmm-mode: Handling install of emacsen flavor ${FLAVOR}"

# e25 makes things stale and unflavoured, just emacs and source dir == compile dir
# before that flavours emacs24, xemacs21 etc.
echo "install/mmm-mode: byte-compiling for ${FLAVOR}"
mkdir -p /usr/share/${FLAVOR}/site-lisp/mmm-mode

for i in $FILES; do
		if [ ! -f /usr/share/${FLAVOR}/site-lisp/mmm-mode/$i ]; then
				ln -s /usr/share/emacs/site-lisp/mmm-mode/$i /usr/share/${FLAVOR}/site-lisp/mmm-mode
		fi
done

	
cd /usr/share/${FLAVOR}/site-lisp/mmm-mode
cat <<EOF > path.el
(setq load-path (cons "." load-path) byte-compile-warnings nil)
EOF
SITEFLAG="--no-site-file"
${FLAVOR} -q ${SITEFLAG} -batch -l path.el -f batch-byte-compile $FILES
rm -f path.el

exit 0;