File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -25,13 +25,11 @@ if { $tcl_version < $min_tcl_ver } {
2525 exit 1
2626}
2727
28- # if modulefile script name is a symlink, resolve it and then
29- # get the fully qualified pathname to this modulefile script
28+ # if modulefile script name is a symlink, resolve it to get the fully
29+ # qualified pathname that points to the actual modulefile script
30+ # see: https://wiki.tcl-lang.org/page/file+normalize
3031set scriptpath "${ModulesCurrentModulefile}"
31- if { "[file type "${scriptpath}"]" eq "link" } {
32- set scriptpath "[file readlink "${scriptpath}"]"
33- }
34- set scriptpath "[file normalize "${scriptpath}"]"
32+ set scriptpath "[file dirname [file normalize "$scriptpath/___"]]"
3533
3634# define componentroot, modulefilepath, modulefilename and modulefilever
3735set modulefilename "[file tail [file dirname "${scriptpath}"]]"
@@ -47,10 +45,11 @@ module-whatis "Description: Intel(R) oneAPI DPC++ Library provides an alternativ
4745module-whatis "URL: https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-library.html"
4846module-whatis "Dependencies: none"
4947
48+ set moduleinfoname [file dirname [module-info name]]
49+
5050proc ModulesHelp { } {
51- global modulefilename
52- global modulefilever
53- module whatis "${modulefilename}/${modulefilever}"
51+ global moduleinfoname
52+ puts "module whatis ${moduleinfoname}"
5453}
5554
5655##############################################################################
You can’t perform that action at this time.
0 commit comments