~salgado/linaro-image-tools/cmd-runner

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/python

import argparse
import sys

from hwpack.builder import ConfigFileMissing, HardwarePackBuilder


if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument(
        "CONFIG_FILE",
        help="The configuration file to take the hardware pack information "
        "from.")
    parser.add_argument(
        "VERSION", help="The version of the hardware pack to create.")
    args = parser.parse_args()
    try:
        builder = HardwarePackBuilder(args.CONFIG_FILE, args.VERSION)
    except ConfigFileMissing, e:
        sys.stderr.write(str(e) + "\n")
        sys.exit(1)
    builder.build()