예제 #1
0
def main():
    parser = argparse.ArgumentParser()
    group = parser.add_mutually_exclusive_group(required=True)
    group.add_argument('-U', '--unpack', nargs=2, metavar=('in_filename', 'out_dir_name'))
    group.add_argument('-B', '--build', nargs=2, metavar=('in_dir_name', 'out_filename'))

    if len(sys.argv) == 1:
        parser.print_help()
        return 1

    args = parser.parse_args()

    if args.unpack is not None:
        extract(*args.unpack)

    if args.build is not None:
        build(*args.build)
예제 #2
0
def main():
    parser = argparse.ArgumentParser()
    group = parser.add_mutually_exclusive_group(required=True)
    group.add_argument('-U',
                       '--unpack',
                       nargs=2,
                       metavar=('in_filename', 'out_dir_name'))
    group.add_argument('-B',
                       '--build',
                       nargs=2,
                       metavar=('in_dir_name', 'out_filename'))

    if len(sys.argv) == 1:
        parser.print_help()
        return 1

    args = parser.parse_args()

    if args.unpack is not None:
        extract(*args.unpack)

    if args.build is not None:
        build(*args.build)
예제 #3
0
def test_extract(conf_file, extract_dir):
    onec_dtools.extract(conf_file, extract_dir)
예제 #4
0
def test_extract(conf_file, extract_dir):
    onec_dtools.extract(conf_file, extract_dir)