summaryrefslogtreecommitdiffstats
path: root/lavalab-gen.py
diff options
context:
space:
mode:
authorCorentin LABBE <clabbe@baylibre.com>2018-10-18 15:39:20 +0200
committerCorentin LABBE <clabbe@baylibre.com>2018-10-18 15:39:20 +0200
commit482e253722b0a154da45fa6e000160cc3d9331e5 (patch)
tree565684ec9e50630053d3b2198d803e8d10f578d4 /lavalab-gen.py
parent444653525a07faeee32eab0c07ec972ed6fe8967 (diff)
lavalab-gen: permit to choose alternate boards.yaml
This patch adds an easy way to choose an alternate file than boards.yaml.
Diffstat (limited to 'lavalab-gen.py')
-rwxr-xr-xlavalab-gen.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/lavalab-gen.py b/lavalab-gen.py
index 9af872b..3dd8eb4 100755
--- a/lavalab-gen.py
+++ b/lavalab-gen.py
@@ -76,6 +76,9 @@ template_settings_conf = string.Template("""
}
""")
+def usage():
+ print("%s [boardsfile.yaml]" % sys.argv[0])
+
def main():
need_zmq_auth_gen = False
fp = open(boards_yaml, "r")
@@ -542,6 +545,11 @@ def main():
print("Gen ZMQ auth files")
subprocess.check_call(["./zmqauth/zmq_auth_fill.sh"], stdin=None)
+if len(sys.argv) > 1:
+ if sys.argv[1] == '-h' or sys.argv[1] == '--help':
+ usage()
+ sys.exit(0)
+ boards_yaml = sys.argv[1]
if __name__ == "__main__":
main()