Some of you might have experienced the problem of correctly defining your PATH, MANPATH, and other environment variables. Even if you didn't have problems, you certainly had to work with it to create the environment you wanted. SoftEnv attempts to make this easier for you by abstracting applications into keywords. If you want to use an application, you just have to include a keyword for it. SoftEnv and the administrators will take care of the details. SoftEnv is also better for the administrators, for we spend less time on user problems and more time on more important things.
The first token you will probably have in your .soft file is the
@default
macro. This defines all of the default PATHs and
MANPATHs needed for the applications you are probably used to using.
Over time, you might want to use a seperate application. Possibly the administrators suggested a key for you to use. Possibly you saw an application you wanted to use after you ran 'softenv'. Either way, just add the correct key to your .soft file and you're set. One thing to remember is that order is important. For example, if it comes first in your .soft file, it will come first in your environment.
This man page should provide all the help you need to edit your .soft, and you can always send email to your administrators for help.
if <variable>=<value> then <operation>
So, some useful examples are:
if ARCH=solaris-2 then +gcc-2.3 if HOSTNAME=gaea then +emacs-20.2 if ARCH=sun4 then @default
These should be very useful to many people.
For convenience when using conditional clauses in your .soft, the soft system guarantees a few environment variables for you:
ARCH
This environment variable will contain a string that is unique for each architecture within the computing environment. A list of valid strings for ARCH can be found at MCS by running this command: whatami -list
HOSTNAME
This environment variable will contain a string that is the short name for the computer you are currently using. It does not include the domain name portion of the hostname.
HOST
This environment variable will contain the long version of the name of the host you are currently using.
WWW_HOME = http://www.freshmeat.net
Also, you can append something to the existing value, which is invaluable when dealing with PATH variables:
PATH += /home/abc/bin/
For example, a line saying ``FOO = bar'' sets the environment variable FOO to bar. Let's say you have these two lines in your .soft:
FOO = bar FOO = qux
When .soft is finished executing, FOO will be equal to ``qux''.
This is a bit trickier when it comes to setting your PATH, because your shell reads your PATH variable and looks for programs by reading each directory in your path in the order that the directories are in the PATH variable. Let's say you have these two lines in your .soft:
@default PATH += ${HOME}/test/bin
These two lines will set your PATH to the value of the default system path, and then append the directory $HOME/test/bin to the PATH. This is probably what you want.
However, let's say you had these two entries in your .soft:
+totalview-2.3 @default
These entries mean ``put totalview-2.3 in my path, and then put all the system directories in my path''. This will work great as long as you really want totalview-2.3. However, if totalview gets upgraded, and totalview-2.5 becomes a part of the system directories, you will still be getting totalview-2.3. This may be what you want, but it may not.
.soft.cache.csh .soft.cache.sh
These are built directly from your .soft file.
If there are any detectable errors in your .soft file, a warning will be printed as the file is processed.
Whenever a change is made to the .soft file, the changes can be loaded into the current enviroment by running this command:
resoft
If you're using a file other than '.soft', you can load your enviroment by pointing the resoft command at that file:
resoft .soft-other
The next time you login, you will get the environment created from your .soft, not this other file. This is because your .soft is used on each different system, and changing the default cache can get fairly confusing.
soft add +gcc-2.5 # gcc-2.5 is now put into your environment soft delete +gcc-2.5
It is recommended that you use resoft whenever you think it is necessary. 'resoft' is guaranteed to return your environment to your initial settings.
'soft add|delete' does not operate on macros. You can only add keywords individually.
A few manual pages you might want to look at are the following:
Somewhere on the MCS website will be an FAQ for Softenv and .soft, and also a conversion help page to help users convert over to .soft from their .software or .software-beta. Those should be found fairly easily.
Lastly, more information can be found by emailing your administrators or the creaters of SoftEnv.