Commit 180f18a 1 parent d27706b commit 180f18a Copy full SHA for 180f18a
File tree 1 file changed +8
-9
lines changed
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 } {
25
25
exit 1
26
26
}
27
27
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
30
31
set 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/___"]]"
35
33
36
34
# define componentroot, modulefilepath, modulefilename and modulefilever
37
35
set modulefilename "[file tail [file dirname "${scriptpath}"]]"
@@ -47,10 +45,11 @@ module-whatis "Description: Intel(R) oneAPI DPC++ Library provides an alternativ
47
45
module-whatis "URL: https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-library.html"
48
46
module-whatis "Dependencies: none"
49
47
48
+ set moduleinfoname [file dirname [module-info name]]
49
+
50
50
proc ModulesHelp { } {
51
- global modulefilename
52
- global modulefilever
53
- module whatis "${modulefilename}/${modulefilever}"
51
+ global moduleinfoname
52
+ puts "module whatis ${moduleinfoname}"
54
53
}
55
54
56
55
##############################################################################
You can’t perform that action at this time.
0 commit comments