From 167f808d7641f2a23f247cb1f66ec93d026ca366 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Sun, 25 Mar 2018 01:01:32 +0100 Subject: contrib/fsm-to-dot: add -h option to print basic instructions Change-Id: I196033e44d50ebb73cf9b44cbdc94a2b8b4f98ce --- contrib/fsm-to-dot.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/fsm-to-dot.py b/contrib/fsm-to-dot.py index 06d2df10..3e9678d3 100755 --- a/contrib/fsm-to-dot.py +++ b/contrib/fsm-to-dot.py @@ -15,6 +15,10 @@ No proper C parsing is done here (pycparser sucked, unfortunately). import sys, re, os +if '-h' in sys.argv or '--help' in sys.argv: + print(__doc__) + exit(0) + def err(msg): sys.stderr.write(msg + '\n') -- cgit v1.2.3