Add modulefile
This commit is contained in:
25
modulefile
Normal file
25
modulefile
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
#%Module4.6
|
||||||
|
|
||||||
|
set fn $ModulesCurrentModulefile
|
||||||
|
set fn [file normalize $ModulesCurrentModulefile]
|
||||||
|
|
||||||
|
if {[file type $fn] eq "link"} {
|
||||||
|
set fn [ exec readlink -f $fn]
|
||||||
|
}
|
||||||
|
|
||||||
|
set mydir_base [ file dirname $fn ]
|
||||||
|
set mydir_base [ file dirname $mydir_base ]
|
||||||
|
set mydir [ file normalize $mydir_base ]
|
||||||
|
|
||||||
|
module-whatis Keep
|
||||||
|
|
||||||
|
prepend-path PATH $mydir/bin
|
||||||
|
|
||||||
|
switch -- [module-info shelltype] {
|
||||||
|
sh {
|
||||||
|
source-sh bash $mydir/profile.bash
|
||||||
|
}
|
||||||
|
csh {
|
||||||
|
source-sh tcsh $mydir/profile.csh
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user