mirror of
https://github.com/envmodules/modules.git
synced 2026-06-18 00:06:53 +08:00
system modulefile command is intended to the command passed to it trough shell, like done on compatibility version. So update system procedure to find correct shell on the current platform and run command through it. Doing so, shell commands with backticks for instance are correctly run. Fixes #205
36 lines
1.1 KiB
Plaintext
36 lines
1.1 KiB
Plaintext
#%Module1.0
|
|
|
|
##############################################################################
|
|
# Modules Revision 3.0
|
|
# Providing a flexible user environment
|
|
#
|
|
# File: system/%M%
|
|
# Revision: %I%
|
|
# First Edition: 95/12/06
|
|
# Last Mod.: %U%, %G%
|
|
#
|
|
# Authors: Jens Hamisch, Jens.Hamisch@Strawberry.COM
|
|
#
|
|
# Description: Testuite modulefile
|
|
# Command:
|
|
# Sub-Command: system
|
|
#
|
|
# Invocation: load @M@
|
|
# Result: %R{
|
|
# setenv _LMFILES_ ${_LMFILES_}:@M@/@V@
|
|
# setenv LOADEDMODULES ${LOADEDMODULES}:@P@/@M@/@V@
|
|
# setenv testsuite 123
|
|
# }R%
|
|
# Comment: %C{
|
|
# Check the 'system' command. It calls the passed shell
|
|
# command and returns its exit status.
|
|
# }C%
|
|
#
|
|
##############################################################################
|
|
|
|
setenv testsuite [system $env(TESTSUITEDIR)/systest]
|
|
setenv testsuite2 [system $env(TESTSUITEDIR)/systest 1 0 9]
|
|
setenv testsuite3 [system "$env(TESTSUITEDIR)/systest 1 0 9"]
|
|
setenv testsuite4 [system "$env(TESTSUITEDIR)/systest1 /path/to/`$env(TESTSUITEDIR)/systest1 dir`/file"]
|
|
setenv testsuite5 [system $env(TESTSUITEDIR)/systest1 /path/to/`$env(TESTSUITEDIR)/systest1 dir`/file]
|