|
From: Jeff S. <jsq...@us...> - 2002-05-24 03:51:00
|
Update of /cvsroot/env-switcher/modules-oscar/src
In directory usw-pr-cvs1:/tmp/cvs-serv11266
Modified Files:
oscar.tcl
Log Message:
Thanks to Jeremiah W for help with the TCL. Fix env-switcher bug
559951 where if there are multiple modules in
/opt/modules/oscar-modulefiles, load each module individually. See
the comments in this file for an explanation.
Index: oscar.tcl
===================================================================
RCS file: /cvsroot/env-switcher/modules-oscar/src/oscar.tcl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** oscar.tcl 16 May 2002 04:51:03 -0000 1.3
--- oscar.tcl 24 May 2002 03:50:57 -0000 1.4
***************
*** 30,37 ****
setenv MANPATH :/opt/modules/default/man
! # Load all the modules in that tree
! set modules_to_load [exec ls $omdir]
! if { $modules_to_load != "" } {
! module load $modules_to_load
}
--- 30,42 ----
setenv MANPATH :/opt/modules/default/man
! # Load all the modules in that tree. We have to call "module" for
! # each one rather than building up a list of them and then running
! # "module load $all_the_modules" because we'd have to pipe that
! # through eval so that "$all_the_modules" expands into multiple argv
! # arguments. But eval will expand meta characters, and potentially
! # run commands. So instead, we run "module load" for each directory
! # in $omdir.
! foreach modulefile [glob $omdir/*] {
! module load [file tail $modulefile]
}
|