2013-07-18 19:22:07 +02:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
import argparse
|
|
|
|
|
|
|
|
import brew
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
parser = argparse.ArgumentParser('Build the docker standard library')
|
|
|
|
parser.add_argument('--push', action='store_true', default=False,
|
|
|
|
help='push generated repositories to the official registry')
|
2013-07-24 16:47:50 +02:00
|
|
|
parser.add_argument('--debug', default=False, action='store_true',
|
|
|
|
help='Enable debugging output')
|
2013-07-18 19:22:07 +02:00
|
|
|
parser.add_argument('-n', metavar='NAMESPACE', default='library',
|
|
|
|
help='namespace used for generated repositories.'
|
|
|
|
' Default is library')
|
2013-07-24 16:47:50 +02:00
|
|
|
parser.add_argument('-b', metavar='BRANCH', default=brew.DEFAULT_BRANCH,
|
2013-07-18 19:22:07 +02:00
|
|
|
help='branch in the repository where the library definition'
|
2013-07-24 16:47:50 +02:00
|
|
|
' files will be fetched. Default is ' + brew.DEFAULT_BRANCH)
|
|
|
|
parser.add_argument('repository', default=brew.DEFAULT_REPOSITORY,
|
|
|
|
nargs='?', help='git repository containing the library definition'
|
|
|
|
' files. Default is ' + brew.DEFAULT_REPOSITORY)
|
2013-07-18 19:22:07 +02:00
|
|
|
args = parser.parse_args()
|
2013-07-24 16:47:50 +02:00
|
|
|
brew.build_library(args.repository, args.b, args.n, args.push, args.debug)
|