Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added --path option to append to PATH

  • Loading branch information...
commit 723a04f9c93aad97a17c95c2d0f95561d3141c9e 1 parent 0851470
@fstrozzi authored
Showing with 8 additions and 1 deletion.
  1. +3 −0  bin/bio-grid
  2. +5 −1 lib/bio/grid/job.rb
View
3  bin/bio-grid
@@ -60,6 +60,9 @@ optparse = OptionParser.new do |opts|
options[:uuid] = uuid
end
+ opts.on("--path PATH1,PATH2 ...",Array,"Set the 'export PATH' directive") do |path|
+ options[:path] = path
+ end
opts.on("--keep-scripts","Keep all the running scripts created for all the jobs") {options[:keep] = true}
opts.on("-h","--help","Display this screen") do
View
6 lib/bio/grid/job.rb
@@ -41,7 +41,11 @@ def append_options
if self.options[:clean]
rm_type = (self.options[:output_folder]) ? "rm -fr" : "rm -f"
self.instructions << ("#{rm_type} #{self.job_output}*\n")
- end
+ end
+
+ if self.options[:path]
+ self.instructions.insert(2, "export PATH=$PATH:#{options[:path].join(':')}\n")
+ end
end
def write_runner(filename)
Please sign in to comment.
Something went wrong with that request. Please try again.