File: ruby-elisp.install

package info (click to toggle)
ruby 1.4.3-6
  • links: PTS
  • area: main
  • in suites: potato
  • size: 4,068 kB
  • ctags: 7,509
  • sloc: ansic: 60,668; ruby: 23,106; yacc: 4,122; sh: 1,753; lisp: 997; makefile: 597; sed: 68; awk: 36; tcl: 31; perl: 17; python: 6
file content (33 lines) | stat: -rw-r--r-- 753 bytes parent folder | download
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
#! /bin/sh -e
set -e

PACKAGE=ruby-elisp
FLAVOR=$1

echo install/${PACKAGE}: Handling install of emacsen flavor ${FLAVOR}

byte_compile_options="-batch -f batch-byte-compile"
el_files="ruby-mode.el inf-ruby.el rubydb3x.el" 
el_dir=/usr/share/emacs/site-lisp/${PACKAGE}
elc_dir=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}

if [ ${FLAVOR} != emacs ]
then
    echo install/${PACKAGE}: byte-compiling for ${FLAVOR}

    install -m 755 -d ${elc_dir}

    # Copy the temp .el files
    for f in ${el_files}
    do
	cp ${el_dir}/${f} ${elc_dir}/
	# Byte compile it
	${FLAVOR} ${byte_compile_options} ${elc_dir}/${f}
    done

    # remove the redundant .el files
    # presumes that any .el files in the <flavor> dir are trash.
    rm ${elc_dir}/*.el
fi

exit 0