Commit d1b6a114 authored by Aurélien Dunand's avatar Aurélien Dunand Committed by Sébastien Luttringer
Browse files

Allow to build multiple images with build command

parent 3d7b2db1
Loading
Loading
Loading
Loading
+16 −12
Original line number Diff line number Diff line
@@ -105,10 +105,13 @@ def c_build(args):
    '''
    Build a source image in the current directory
    '''
    for path in args.paths:
        arrow("Build %s" % path)
        arrowlevel(1)
        # build start time
        t0 = time.time()
        # load source image
    simg = SourceImage(args.path)
        simg = SourceImage(path)
        # do the job
        simg.build(force=args.force, force_payload=args.payload,
                   check=not args.no_check, script=not args.no_script)
@@ -116,6 +119,7 @@ def c_build(args):
        t1 = time.time()
        dt = int(t1 - t0)
        arrow(u"Build time: %s" % datetime.timedelta(seconds=dt))
        arrowlevel(-1)

def c_cat(args):
    '''
@@ -458,7 +462,7 @@ def arg_parser_init():
                   help="rebuild payloads if already exists")
    p.add_argument("-s", "--no-script", action="store_true",
                   help="doesn't execute build script")
    p.add_argument("path", nargs="?", default=u".")
    p.add_argument("paths", nargs="*", default=u".")
    p.set_defaults(func=c_build)
    # cat command parser
    p = subparser.add_parser("cat", help=c_cat.__doc__.lower())
+1 −1
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ _is() {
      build)
         [[ "$cur" == -* ]] && _opt '-h --help -f --force -p --payload -c --no-check -s --no-script' && return 0
         _count_args
         (( args == 2 )) && _filedir -d
         (( args >= 2 )) && _filedir -d
      ;;
      cat)
         [[ "$cur" == -* ]] && _opt '-h --help' && return 0