Sha256: 7a0f12d6b345cc0b19d2f153b5cd711611ed5ef8990efdfb6279752e76c17355

Contents?: true

Size: 812 Bytes

Versions: 3

Compression:

Stored size: 812 Bytes

Contents

#!/usr/bin/env ruby

require 'rubygems'
require 'bundler/setup'
require 'optparse'
require 'sequenceserver'

# display name for tools like `ps`
$PROGRAM_NAME = 'sequenceserver'

# e.g:
# sequenceserver --config .sequenceserver.conf format_database
begin
  # parse command line till first non-option, removing parsed options from ARGV
  OptionParser.new do |opts|
    opts.on('-c', '--config CONFIG_FILE', 'Use the given configuration file') do |config_file|
      SequenceServer::App.config_file = File.expand_path(config_file)
    end
  end.order!

  # of the remaining items in ARGV, the first one must be a subcommand
  case ARGV.shift
  when 'format_database'
    require 'sequenceserver/database_formatter'
    exit
  end
rescue OptionParser::InvalidOption =>e
  puts e
  exit
end

SequenceServer::App.run!

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sequenceserver-0.7.3 bin/sequenceserver
sequenceserver-0.7.2 bin/sequenceserver
sequenceserver-0.7.1 bin/sequenceserver