File: emacsen-install

package info (click to toggle)
gforth 0.7.3+dfsg-9
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 5,992 kB
  • sloc: ansic: 8,535; sh: 3,666; lisp: 1,778; makefile: 1,019; yacc: 186; sed: 141; lex: 102; awk: 21
file content (47 lines) | stat: -rw-r--r-- 1,160 bytes parent folder | download | duplicates (3)
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
36
37
38
39
40
41
42
43
44
45
46
47
#! /bin/sh -e
# /usr/lib/emacsen-common/packages/install/gforth

# Written by Jim Van Zandt <jrv@vanzandt.mv.com>, borrowing heavily
# from the install scripts for gettext by Santiago Vila
# <sanvila@ctv.es> and octave by Dirk Eddelbuettel <edd@debian.org>.
# Reworked a bit by Peter Pentchev <roam@ringlet.net>, borrowing heavily
# from the emacsen-common example scripts by Rob Browning
# <rlb@defaultvalue.org> and the dictionaries-common install scripts.

set -e

flavor=$1
package=gforth

case "$flavor" in
	emacs)
		# Dummy emacs flavor. Do nothing and exit
		exit 0
		;;
	xemacs*)
		flags="-no-site-file"
		;;
	emacs*)
		flags="--no-site-file"
		;;
	*)
		echo install/$package: Ignoring emacsen flavor [$flavor]
		exit 0
		;;
esac

echo "install/$package: Handling install for emacsen flavor $flavor"

flags="$flags -q -batch -l path.el -f batch-byte-compile"
eldir="/usr/share/emacs/site-lisp/$package"
elcdir="/usr/share/$flavor/site-lisp/$package"

install -m 755 -d "${elcdir}"
cd "$elcdir"
ln -sf "$eldir"/*.el .

cat << EOF > path.el
(setq load-path (cons "." load-path) byte-compile-warnings nil)
EOF
"$flavor" $flags *.el
rm -f path.el path.elc