Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
grid5000
reference-repository
Commits
45f1e866
Commit
45f1e866
authored
Mar 08, 2016
by
Jérémie Gaidamour
Browse files
[dev] -o FILE option
parent
8ac9a3be
Changes
2
Hide whitespace changes
Inline
Side-by-side
generators/oar-properties/lib/lib-oar-properties.rb
View file @
45f1e866
...
...
@@ -177,8 +177,9 @@ end
def
oarcmd_set_node_properties
(
host
,
properties
)
return
"#
#{
host
}
: OK"
if
properties
.
size
==
0
command
=
"#
#{
host
}
:
\n
"
command
+=
"
#{
ENV
[
"SUDO"
]
}
oarnodesetting -h
#{
host
}
-p "
# command = "# #{host}:\n"
# command += "#{ENV["SUDO"]} oarnodesetting -h #{host} -p "
command
=
"oarnodesetting -h
#{
host
}
-p "
command
+=
properties
.
to_a
.
map
{
|
(
k
,
v
)
|
...
...
generators/oar-properties/oar-properties.rb
View file @
45f1e866
...
...
@@ -50,7 +50,7 @@ OptionParser.new do |opts|
opts
.
separator
""
opts
.
separator
"Output options:"
opts
.
on
(
'-o'
,
'--output'
,
'Output oarnodesetting command into a file. Default: stdout'
)
do
|
o
|
opts
.
on
(
'-o
FILE
'
,
'--output
=FILE
'
,
'Output oarnodesetting command into a file. Default: stdout'
)
do
|
o
|
options
[
:output
]
=
o
end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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