John,
This is how we are doing it. If you use the 'release', then you only
need to worry about the OS version number:
case [uname release] in {
{5.*} {
##
## Solaris Block
##
append-path PATH
}
{2*} {
##
## Linux Block
##
append-path PATH
}
default {
puts stderr "Cant determine Machine Type"
}
}
Jon Turenne
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jonathan P. Turenne Main Phone : (978) 692-2600
Lucent Technologies Direct Line: (978) 952-7736
EDA Tools Group Fax: (978) 692-1983
Email: jtu...@lu...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
On Wed, 10 Jan 2001, John Mincarelli wrote:
> Hi,
>
> I have been using modules for a long time and recently ran into a problem
> with the Modules 3.1.0b version of modules on Linux. When I use Modules
> 2.2beta with a module file that has a case statement it seems to work fine.
> In the example below the case statement parses out a piece of the "uname"
> and sets variables accordingly.
>
> When I use 3.1.0b it seems that the module file will not work with the case
> statement unless the case is only for Linux.
>
> Has anyone else seen this behavior ?
>
>
> Sample code:
>
> case $env(OS_TYPE) {
> { "Linux.2.2*" } {
> set arch intel_i686_linux_2.2
> }
> { "SunOS.5.*" } {
> set arch sun_sparc_solaris_5.5.1
> }
> }
> prepend-path PATH /path/$arch
>
>
|