diff options
author | Gary E. Miller <gem@rellim.com> | 2018-09-21 15:02:51 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2018-09-21 15:02:51 -0700 |
commit | d5e06512397575de59ff949e99417cedff69d212 (patch) | |
tree | f65598dc3c3be2d7e499fdc7032cc31dd83c14c6 /gpsprof | |
parent | 3418b9b73ac5c7cef9b4c5414d9eb3484f2b57d2 (diff) | |
download | gpsd-d5e06512397575de59ff949e99417cedff69d212.tar.gz |
gpsprof: Add -V option to print version.
Diffstat (limited to 'gpsprof')
-rwxr-xr-x | gpsprof | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1041,6 +1041,7 @@ usage: gpsprof [OPTION]... [server[:port[:device]]] [-S subtitle] [-T terminal] [-t title] + [-V] ''' % ("|".join([x.name for x in formatters]))) sys.exit(0) @@ -1048,7 +1049,7 @@ usage: gpsprof [OPTION]... [server[:port[:device]]] if __name__ == '__main__': try: (options, arguments) = getopt.getopt(sys.argv[1:], - "d:f:hl:m:n:rs:S:t:T:D:") + "d:f:hl:m:n:rs:t:D:S:T:V") plotmode = "space" raw = False @@ -1092,6 +1093,9 @@ if __name__ == '__main__': subtitle = val elif switch == '-T': terminal = val + elif switch == '-V': + sys.stderr.write("gpsprof: Version %s\n" % gps_version) + sys.exit(0) (host, port, device) = ("localhost", "2947", None) if len(arguments): |