Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
jflow
Commits
3d7bb48c
Commit
3d7bb48c
authored
Feb 10, 2017
by
Floreal Cabanettes
Browse files
Fix modules in shell functions
parent
e75a7f36
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/weaver/function.py
View file @
3d7bb48c
...
...
@@ -194,8 +194,9 @@ class ShellFunction(ScriptFunction):
shell_path
=
shell
shell
=
os
.
path
.
basename
(
shell
)
source
=
'#!%s
\n
'
%
shell_path
+
\
(
"
\n
"
.
join
((
"module load "
+
module
)
for
module
in
modules
)
if
len
(
modules
)
>
0
else
""
)
+
"
\n
"
+
source
+
\
(
"
\n
"
.
join
((
"module unload "
+
module
)
for
module
in
modules
)
if
len
(
modules
)
>
0
else
""
)
(
"
\n
"
.
join
((
"module load "
+
module
)
for
module
in
modules
)
if
len
(
modules
)
>
0
else
""
)
+
"
\n
"
+
\
source
+
\
"
\n
"
+
(
"
\n
"
.
join
((
"module unload "
+
module
)
for
module
in
modules
)
+
if
len
(
modules
)
>
0
else
""
)
ScriptFunction
.
__init__
(
self
,
source
,
executable
,
cmd_format
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment