summaryrefslogtreecommitdiff
path: root/contrib/ntpshmviz
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-09-21 15:41:18 -0700
committerGary E. Miller <gem@rellim.com>2018-09-21 15:41:18 -0700
commitb51dc547b0a11226ea741ac0c50fe7fa57f002fd (patch)
tree19c3af50fd4fbaf452574af834f2b5c32fcb4125 /contrib/ntpshmviz
parent5879cfa59503dea7e9df7f8954c5ddf421dbd2b2 (diff)
downloadgpsd-b51dc547b0a11226ea741ac0c50fe7fa57f002fd.tar.gz
ntpshmviz: Change version to gps_version.
Diffstat (limited to 'contrib/ntpshmviz')
-rwxr-xr-xcontrib/ntpshmviz9
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/ntpshmviz b/contrib/ntpshmviz
index fee7f921..7831bfa3 100755
--- a/contrib/ntpshmviz
+++ b/contrib/ntpshmviz
@@ -21,6 +21,7 @@ except:
sys.exc_info()[0])
sys.exit(1)
+gps_version = '3.18-dev'
class ntpOffset:
def __init__(self, stream):
@@ -101,14 +102,14 @@ class ntpOffset:
stream.close()
if __name__ == "__main__":
- if (len(sys.argv) == 2):
+ if (len(sys.argv) >= 2):
if (sys.argv[1] == "-V" or sys.argv[1] == "--version"):
- print ("Version 2.0")
- sys.exit()
+ sys.stderr.write("ntpshmviz: Version %s\n" % gps_version)
+ sys.exit(0)
if (sys.argv[1] == "-h" or sys.argv[1] == "--help"):
print ("""
-Usage: <input stream> | ntpshmviz
+Usage: <input stream> | ntpshmviz [-h|--help] [-V|--version]
Example: ntpshmmon -n 100 | ntpshmviz