A properly set-up environment is crucial for working in the Legion system. The start-up process uses certain Legion-specific environment variables, which must be correctly set before starting applications and running command-line utility programs. Users must set these variables each time they enter Legion. Without a properly set environment, programs cannot communicate with other objects in the system, and the program may terminate with an error, never return a value, or fail in a more spectacular fashion. If this occurs, try setting your environment properly and starting over.
To prepare the environment in a newly started or restarted system, set the $LEGION and $LEGION_OPR variables and source the script that is appropriate for your shell.*
export LEGION=<Legion root dir path> export LEGION_OPR=<Legion OPR root dir path>
setenv LEGION <Legion root dir path> setenv LEGION_OPR <Legion OPR root dir path>
The environment must be properly set in each shell in which you plan to run Legion commands. Check to be sure that environment variables are properly set. If necessary, run:
. $LEGION/bin/legion_env.sh . $LEGION_OPR/legion_context_env.sh
source $LEGION/bin/legion_env.csh source $LEGION_OPR/legion_context_env.csh
For the OPR root directory path we suggest $LEGION/../OPR.
We suggest that Legion system administrators prepare a set-up script for users to source when starting work in Legion. You can run the legion_make_setup_script command to automatically generate a set-up script for your system. The usage is:
legion_make_setup_script [-help]
[-o <script basename>]
[-OPR <OPR dir name>]
[-L <$LEGION dir name>]
This script sets the environment variables for Legion users.
The following options are supported:
-o
<script basename> Specify the basename for the resulting setup scripts
(default is /home/xxxx/OPR/setup). This command will generate
two setup scripts, one for /bin/sh derivative users and one for
csh-derivative users. The scripts will be named
<script basename>.sh and <script basename>.csh,
respectively.
-OPR
<OPR dir name> Specify the OPR directory name that will be set up
when the resulting scripts are run. This directory will
contain the user's local copy of LegionClass.config
(default is Legion-OPR). The user's local version of the
directory will be placed in the user's $HOME.
-L
<$LEGION dir name> Specify the value of $LEGION, which is the
directory where the resulting scripts are run. The default
is the current value of $LEGION.
* Bourne Shell is not directly supported by our implementation of Legion, due to the use of alias to implement some Legion commands (notably legion_set_context). Bash, however, is supported.

Directory of Legion 1.5 Manuals