bin/amake in autoproj-1.7.13 vs bin/amake in autoproj-1.7.14.rc1

- old
+ new

@@ -1,11 +1,11 @@ #! /usr/bin/env ruby require 'optparse' build_all = false -force = 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 @@ -15,12 +15,15 @@ " 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 - force = true + 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 @@ -43,14 +46,10 @@ # / package name), add the current directory to the command line if remaining.grep(/^-/).size == remaining.size && !build_all remaining.push '.' end -if force - remaining.unshift "force-build" -else - remaining.unshift "build" -end +remaining.unshift mode ARGV.clear ARGV.concat(remaining) load File.expand_path('autoproj', File.dirname(__FILE__))