Skip to content

Commit

Permalink
[Integration] Minor fixes in modulefile (#1196)
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitriy Sobolev <[email protected]>
  • Loading branch information
dmitriy-sobolev committed Sep 19, 2023
1 parent d27706b commit 180f18a
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions integration/modulefiles/dpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@ if { $tcl_version < $min_tcl_ver } {
exit 1
}

# if modulefile script name is a symlink, resolve it and then
# get the fully qualified pathname to this modulefile script
# if modulefile script name is a symlink, resolve it to get the fully
# qualified pathname that points to the actual modulefile script
# see: https://wiki.tcl-lang.org/page/file+normalize
set scriptpath "${ModulesCurrentModulefile}"
if { "[file type "${scriptpath}"]" eq "link" } {
set scriptpath "[file readlink "${scriptpath}"]"
}
set scriptpath "[file normalize "${scriptpath}"]"
set scriptpath "[file dirname [file normalize "$scriptpath/___"]]"

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

set moduleinfoname [file dirname [module-info name]]

proc ModulesHelp { } {
global modulefilename
global modulefilever
module whatis "${modulefilename}/${modulefilever}"
global moduleinfoname
puts "module whatis ${moduleinfoname}"
}

##############################################################################
Expand Down

0 comments on commit 180f18a

Please sign in to comment.