Once upon a time (like on Aug 10, 2001), Scott Gaskins wrote:
> But what I want is some more elegant and meaningful message like:
> # module load apps/verilint
> Note: The module 'apps/verilint' is not available for Linux.
>
> So currently I have hacked up lots of 'dummy' modules that match most of
> the modules in our AIX modulefiles directory but really are symbolic links
> back to a single module file called 'notavail'. In the second example
> above, I use a symlink from modulefiles/apps/verilint ->
What I have been doing is to use a single modulefile directory shared
among all the platforms that we support. The modules have specific
instructions based on the OS detected. These are selected via a
switch statement such as the following:
#--------------------------------------------------------------------------
set os [join [list [uname sysname] [uname release]]]
switch -glob $os {
"SunOS 5.*" {
# SunOS 5.x specific stuff
}
"SunOS 4.*" {
# SunOS 4.x specific stuff
}
"HP-UX B.10*" -
"Linux*" -
"AIX*" -
"HP-UX*" {
append-path PATH $env(EXAMPLE)/bin
append-path LM_LICENSE_FILE 1700@lic-serv
# Common stuff
common_proc
}
}
|