~ubuntu-branches/ubuntu/trusty/ruby1.9/trusty

« back to all changes in this revision

Viewing changes to benchmark/make_fasta_output.rb

  • Committer: Bazaar Package Importer
  • Author(s): Stephan Hermann
  • Date: 2008-01-24 11:42:29 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20080124114229-jw2f87rdxlq6gp11
Tags: 1.9.0.0-2ubuntu1
* Merge from debian unstable, remaining changes:
  - Robustify check for target_os, fixing build failure on lpia.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# prepare 'fasta.output'
 
2
 
 
3
def prepare_fasta_output n
 
4
  filebase = File.join(File.dirname($0), 'fasta.output')
 
5
  script = File.join(File.dirname($0), 'bm_so_fasta.rb')
 
6
  file = "#{filebase}.#{n}"
 
7
 
 
8
  unless FileTest.exist?(file)
 
9
    STDERR.puts "preparing #{file}"
 
10
 
 
11
    open(file, 'w'){|f|
 
12
      ARGV[0] = n
 
13
      $stdout = f
 
14
      load script
 
15
      $stdout = STDOUT
 
16
    }
 
17
  end
 
18
end
 
19