Sha256: 84b634daab035f51537b5f8c90cc240202c76b11220c191fc0a0eab5b7c9f235

Contents?: true

Size: 671 Bytes

Versions: 1

Compression:

Stored size: 671 Bytes

Contents

#!/usr/bin/env ruby

require 'require_all'

module Rebuild
  require_relative '../lib/rbld_commands'
  require_rel '../lib/commands'
end

begin

  rbld_log.info( "ARGV: #{ARGV.join(' ')}" )

  if !ARGV[0] || (ARGV[0] == "help" && !ARGV[1])
    puts Rebuild::CLI::Main.usage
    puts
    exit 0
  end

  if ARGV[0] == "help"
    Rebuild::CLI::Commands.usage( ARGV[1] )
    exit 0
  end

  if ARGV[1] == "--help" || ARGV[1] == "-h"
    Rebuild::CLI::Commands.usage( ARGV[0] )
    exit 0
  end

  exit Rebuild::CLI::Commands.run( ARGV[0], ARGV.drop(1) ) || 0

rescue StandardError => e
  rbld_print.error(e.message)
  e.backtrace.each { |l| rbld_log.fatal(l) }
  exit 1
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rbld-1.2.0 cli/bin/rbld