File: global.emacsen-install

package info (click to toggle)
global 4.8.6-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,356 kB
  • ctags: 4,245
  • sloc: ansic: 26,150; lex: 1,471; perl: 1,233; sh: 1,032; lisp: 410; makefile: 158; yacc: 123
file content (29 lines) | stat: -rw-r--r-- 714 bytes parent folder | download | duplicates (6)
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
#!/bin/sh -e

FLAVOR=$1
PACKAGE=global
el_files=gtags.el

byte_compile_options="-batch -f batch-byte-compile"
el_dir="/usr/share/emacs/site-lisp/${PACKAGE}/"
elc_dir="/usr/share/${FLAVOR}/site-lisp/${PACKAGE}/"
el_path_list=`echo ${el_files} | perl -pe "s|^|${el_dir}|o"`
elc_path_list=`echo ${el_files} | perl -pe "s|^|${elc_dir}|o"`

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

	# Copy the temp .el files
	install -m 755 -d ${elc_dir}
	cp ${el_path_list} ${elc_dir}

	# Byte compile them
	${FLAVOR} ${byte_compile_options} ${elc_path_list}

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