Sha256: f2f4b90c6b40edbf81205b083930d80ef306f36c06d6598f5b6681cf21c9d6bb

Contents?: true

Size: 1.24 KB

Versions: 14

Compression:

Stored size: 1.24 KB

Contents

#! /usr/bin/env ruby
require 'optparse'

build_all = false
parser = OptionParser.new do |opt|
    opt.banner = "aup [options] [dir_or_package]
Runs autoproj update for the given directory or package name.
Selects the current directory if none is given. Override by
passing the --all option.

Accepts all options from autoproj update 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('--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 'update'

ARGV.clear
ARGV.concat(remaining)
load File.expand_path('autoproj', File.dirname(__FILE__))

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
autoproj-1.7.14 bin/aup
autoproj-1.7.14.rc6 bin/aup
autoproj-1.7.14.rc5 bin/aup
autoproj-1.7.14.rc4 bin/aup
autoproj-1.7.14.rc2 bin/aup
autoproj-1.7.14.rc1 bin/aup
autoproj-1.7.13 bin/aup
autoproj-1.7.12 bin/aup
autoproj-1.7.12.rc2 bin/aup
autoproj-1.7.12.rc1 bin/aup
autoproj-1.7.11 bin/aup
autoproj-1.7.11.rc1 bin/aup
autoproj-1.7.10 bin/aup
autoproj-1.7.9 bin/aup