Sha256: 241763798b64a2f707a2f67097b60273ee693e6a1af67e4c510190bdb29a36c1

Contents?: true

Size: 1.44 KB

Versions: 48

Compression:

Stored size: 1.44 KB

Contents

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

build_all = (Dir.pwd == Autoproj.root_dir)
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
#
# BUT make running 'aup' in the root directory the equivalent of aup --all
if remaining.grep(/^-/).size == remaining.size && !build_all
    remaining.push '.'
end
remaining.unshift 'update'

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

48 entries across 48 versions & 1 rubygems

Version Path
autoproj-1.13.0.b4 bin/aup
autoproj-1.13.0.b3 bin/aup
autoproj-1.13.0.b2 bin/aup
autoproj-1.13.0.b1 bin/aup
autoproj-1.12.5 bin/aup
autoproj-1.12.4 bin/aup
autoproj-1.12.3 bin/aup
autoproj-1.12.2 bin/aup
autoproj-1.12.1 bin/aup
autoproj-1.12.0 bin/aup
autoproj-1.11.0.rc15 bin/aup
autoproj-1.11.0.rc14 bin/aup
autoproj-1.11.0.rc13 bin/aup
autoproj-1.11.0.rc12 bin/aup
autoproj-1.11.0.rc11 bin/aup
autoproj-1.11.0.rc10 bin/aup
autoproj-1.11.0.rc9 bin/aup
autoproj-1.11.0.rc8 bin/aup
autoproj-1.11.0.rc7 bin/aup
autoproj-1.11.0.rc6 bin/aup