Merge from vendor branch TNF:
[pkgsrcv2.git] / lang / smalleiffel / files / smalleiffel.sh
1 #!/bin/sh
2 #
3 # $NetBSD: smalleiffel.sh,v 1.3 1999/10/12 08:01:33 jlam Exp $
4 #
5 # This script is invoked as:
6 #
7 #       smalleiffel <cmd> [<arg> ...]
8 #
9 # where <cmd> is one of the programs in @@SE_LIBEXEC@@.
10 #
11 SmallEiffel=@@SE_LIB@@/sys/system.se; export SmallEiffel
12 se_cmd=@@SE_LIBEXEC@@/$1
13 shift
14
15 # Load the local SmallEiffel environment from:
16 #       ./.smalleiffelrc, or else
17 #       ${HOME}/.smalleiffelrc.
18 # This file is the right place to define new environment variables used
19 # by 3rd-party libraries, e.g. GOBO=/usr/pkg/share/gobo-eiffel.
20 #
21 if [ -f ./.smalleiffelrc ]
22 then
23         . ./.smalleiffelrc
24 elif [ -f ${HOME}/.smalleiffelrc ]
25 then
26         . ${HOME}/.smalleiffelrc
27 fi
28
29 if [ -x ${se_cmd} ]
30 then
31         exec ${se_cmd} ${1+$@}
32 else
33         echo "smalleiffel: command ${se_cmd} not found."
34 fi