summaryrefslogtreecommitdiff
path: root/debian/cscope.emacsen-install
blob: b3a70d4e8f7bded85063af7b8e6a09fe2e8e7f00 (plain)
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
#!/bin/sh
#
# emacsen install script for the Debian GNU/Linux cscope package
# based on the emacsen install script of the cmake package

FLAVOUR=$1
PACKAGE=cscope

ELDIR=/usr/share/emacs/site-lisp/
ELCDIR=/usr/share/$FLAVOUR/site-lisp/$PACKAGE
ELFILE="xscope.el"
FLAGS="-batch -no-site-file -l path.el -f batch-byte-compile"

if [ $FLAVOUR != emacs ]; then
	echo "install/$PACKAGE: Byte-compiling for $FLAVOUR"

	install -m 755 -d $ELCDIR
	cd $ELDIR
	cp $ELFILE $ELCDIR
	cd $ELCDIR
	cat << EOF > path.el
(setq load-path (cons "." load-path) byte-compile-warnings nil)
EOF
	$FLAVOUR $FLAGS $ELFILE
	rm -f $ELFILE path.el
fi