Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Łukasz Nowak
slapos
Commits
e991f7f7
Commit
e991f7f7
authored
Feb 14, 2013
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add environnment variable to createWrapper
parent
5d65d899
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
slapos/recipe/librecipe/generic.py
slapos/recipe/librecipe/generic.py
+6
-1
No files found.
slapos/recipe/librecipe/generic.py
View file @
e991f7f7
...
@@ -127,7 +127,8 @@ class GenericBaseRecipe(object):
...
@@ -127,7 +127,8 @@ class GenericBaseRecipe(object):
path
,
arguments
=
arguments
)[
0
]
path
,
arguments
=
arguments
)[
0
]
return
script
return
script
def
createWrapper
(
self
,
name
,
command
,
parameters
,
comments
=
[],
parameters_extra
=
False
):
def
createWrapper
(
self
,
name
,
command
,
parameters
,
comments
=
[],
parameters_extra
=
False
,
env
=
None
):
"""
"""
Creates a very simple (one command) shell script for process replacement.
Creates a very simple (one command) shell script for process replacement.
Takes care of quoting.
Takes care of quoting.
...
@@ -138,6 +139,10 @@ class GenericBaseRecipe(object):
...
@@ -138,6 +139,10 @@ class GenericBaseRecipe(object):
for
comment
in
comments
:
for
comment
in
comments
:
lines
.
append
(
'# %s'
%
comment
)
lines
.
append
(
'# %s'
%
comment
)
if
env
:
for
key
in
env
:
lines
.
append
(
'export %s=%s'
%
(
key
,
env
[
key
]))
lines
.
append
(
'exec %s'
%
shlex
.
quote
(
command
))
lines
.
append
(
'exec %s'
%
shlex
.
quote
(
command
))
for
param
in
parameters
:
for
param
in
parameters
:
...
...
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