summaryrefslogtreecommitdiff
path: root/gpsprof
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-09-21 15:02:51 -0700
committerGary E. Miller <gem@rellim.com>2018-09-21 15:02:51 -0700
commitd5e06512397575de59ff949e99417cedff69d212 (patch)
treef65598dc3c3be2d7e499fdc7032cc31dd83c14c6 /gpsprof
parent3418b9b73ac5c7cef9b4c5414d9eb3484f2b57d2 (diff)
downloadgpsd-d5e06512397575de59ff949e99417cedff69d212.tar.gz
gpsprof: Add -V option to print version.
Diffstat (limited to 'gpsprof')
-rwxr-xr-xgpsprof6
1 files changed, 5 insertions, 1 deletions
diff --git a/gpsprof b/gpsprof
index 954356ca..9ec73f39 100755
--- a/gpsprof
+++ b/gpsprof
@@ -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):