Sha256: 9003709d44934e66deccca40e19dfcb86cb411739e4f972bcb8cfceda36e1878

Contents?: true

Size: 1.52 KB

Versions: 169

Compression:

Stored size: 1.52 KB

Contents

#! /usr/bin/env ruby

require 'optparse'

build_all = false
mode = "build"

parser = OptionParser.new do |opt|
    opt.banner = "amake [options] [dir_or_package]
Runs autoproj build for the given directory or package name.
Selects the current directory if none is given

Accepts all options from autoproj build plus the following options:

"
    opt.on('--all', 'runs autoproj build without arguments (does not add the current directory)') do
        build_all = true
    end
    opt.on('--force', 'runs autoproj force-build instead of autoproj build') do
        mode = "force-build"
    end
    opt.on('--rebuild', 'runs autoproj force-build instead of autoproj build') do
        mode = "rebuild"
    end
    opt.on('--help', 'shows this help message') do
        puts parser
        exit(0)
    end
end

# Accept options that are invalid in +parser+, to pass them on to autoproj
# itself
options = ARGV.dup
remaining = []
while !options.empty?
    begin
        head = options.shift
        remaining.concat(parser.parse([head]))
    rescue OptionParser::InvalidOption
        remaining << head
        retry
    end
end

# If --all is not given *and* there is no non-option argument (i.e. no directory
# / package name), add the current directory to the command line
if remaining.grep(/^-/).size == remaining.size && !build_all
    remaining.push '.'
end

remaining.unshift mode
ORIGINAL_ARGV = ARGV.dup # This is used in case autoproj needs to update itself
ARGV.clear
ARGV.concat(remaining)
load File.expand_path('autoproj', File.dirname(__FILE__))

Version data entries

169 entries across 169 versions & 1 rubygems

Version Path
autoproj-1.13.7 bin/amake
autoproj-1.13.6 bin/amake
autoproj-1.13.5 bin/amake
autoproj-1.13.5.rc1 bin/amake
autoproj-1.13.4 bin/amake
autoproj-1.13.3 bin/amake
autoproj-1.13.3.b2 bin/amake
autoproj-1.13.3.b1 bin/amake
autoproj-1.13.2.b4 bin/amake
autoproj-1.13.2.b3 bin/amake
autoproj-1.13.2.b2 bin/amake
autoproj-1.13.2.b1 bin/amake
autoproj-1.13.2 bin/amake
autoproj-1.13.1 bin/amake
autoproj-1.13.0 bin/amake
autoproj-1.12.6 bin/amake
autoproj-1.13.0.b8 bin/amake
autoproj-1.13.0.b7 bin/amake
autoproj-1.13.0.b6 bin/amake
autoproj-1.13.0.b5 bin/amake