summaryrefslogtreecommitdiff
path: root/lang/smalleiffel/files/smalleiffel.sh
blob: 66900cc7dfdc5c8e70389b912f5c6fe8dbdeb088 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/sh
#
# $NetBSD: smalleiffel.sh,v 1.6 2003/10/12 11:55:47 jmmv Exp $
#
# This script is invoked as:
#
# 	smalleiffel <cmd> [<arg> ...]
#
# where <cmd> is one of the programs in @@SE_LIBEXEC@@.
#
SmallEiffel=@@SE_LIB@@/sys/system.se; export SmallEiffel

if [ -z $1 ]
then
	cat << EOF
Usage:
	smalleiffel <cmd> [<arg> ...]

where <cmd> can be:

	clean
	compile
	compile_to_c
	compile_to_jvm
	finder
	pretty
	print_jvm_class
	short

For more documentation on these commands, point a Web browser at:

	@@SE_DOC@@/index.html

EOF
exit 0
fi

se_cmd=@@SE_LIBEXEC@@/$1
shift

# Load the local SmallEiffel environment from:
#	./.smalleiffelrc, or else
#	${HOME}/.smalleiffelrc.
# This file is the right place to define new environment variables used
# by 3rd-party libraries, e.g. GOBO=/usr/pkg/share/gobo-eiffel.
#
if [ -f ./.smalleiffelrc ]
then
	. ./.smalleiffelrc
elif [ -f ${HOME}/.smalleiffelrc ]
then
	. ${HOME}/.smalleiffelrc
fi

if [ -x ${se_cmd} ]
then
	exec ${se_cmd} ${1+$@}
else
	echo "smalleiffel: command ${se_cmd} not found."
fi