Skip to content

Commit 180f18a

Browse files
[Integration] Minor fixes in modulefile (#1196)
Signed-off-by: Dmitriy Sobolev <[email protected]>
1 parent d27706b commit 180f18a

File tree

1 file changed

+8
-9
lines changed
  • integration/modulefiles

1 file changed

+8
-9
lines changed

integration/modulefiles/dpl

+8-9
Original file line numberDiff line numberDiff 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
3031
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/___"]]"
3533

3634
# define componentroot, modulefilepath, modulefilename and modulefilever
3735
set modulefilename "[file tail [file dirname "${scriptpath}"]]"
@@ -47,10 +45,11 @@ module-whatis "Description: Intel(R) oneAPI DPC++ Library provides an alternativ
4745
module-whatis "URL: https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-library.html"
4846
module-whatis "Dependencies: none"
4947

48+
set moduleinfoname [file dirname [module-info name]]
49+
5050
proc ModulesHelp { } {
51-
global modulefilename
52-
global modulefilever
53-
module whatis "${modulefilename}/${modulefilever}"
51+
global moduleinfoname
52+
puts "module whatis ${moduleinfoname}"
5453
}
5554

5655
##############################################################################

0 commit comments

Comments
 (0)