Open xdelaruelle opened 3 weeks ago
@jeevan4 bat
scripts are not supported currently by source-sh
modulefile command or sh-to-mod
sub-command.
Even if I did not tried it, I think it should be possible to execute a bash
script through source-sh
or sh-to-mod
on Windows. bash
binary should be available in a directory listed in PATH or full path toward it should be provided as first argument of source-sh
or sh-to-mod
.
It would be interesting if you could tell us if you succeed or if you encounter specific issues.
To produce one modulefile that works on both Windows and Linux platform, you may also use the following Tcl conditional test to adapt execute depending on the platform (especially useful if both platforms do not share the exact same setup):
if {$::tcl_platform(platform) eq {windows}} {
# code specific to the Windows platform
} else {
# code specific to the Linux platform
}
I am using module framework on windows and I have downloaded windows package as well as install tclsh on my machine..
Is there a way to source a bat file or shell script on windows command prompt ?
Appreciate your inputs as I need to create a single modulefile for both linux and windows such that this is possible?
Originally posted by @jeevan4 in https://github.com/cea-hpc/modules/issues/399#issuecomment-2226428380