summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvery Pennarun <apenwarr@gmail.com>2012-01-06 13:45:43 -0500
committerAvery Pennarun <apenwarr@gmail.com>2012-01-06 13:45:43 -0500
commit41d1f73dc2f68369b6831ac492988e071ec2bfbd (patch)
treeb27824f717f48a5aa79dbda1b2a8e9ffbded686a
parentcbc32ff8d8e35c648b09114db0bad7af1c078f14 (diff)
Add a --version (-V) option.
Now that we imported the feature from redo, might as well use it.
-rw-r--r--all.do2
-rwxr-xr-xmain.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/all.do b/all.do
index 9fe5099..7282cb5 100644
--- a/all.do
+++ b/all.do
@@ -1,7 +1,7 @@
exec >&2
UI=
[ "$(uname)" = "Darwin" ] && UI=ui-macos/all
-redo-ifchange Documentation/all $UI
+redo-ifchange Documentation/all version/all $UI
echo
echo "What now?"
diff --git a/main.py b/main.py
index 1cf00af..a88ca9d 100755
--- a/main.py
+++ b/main.py
@@ -63,6 +63,7 @@ seed-hosts= with -H, use these hostnames for initial scan (comma-separated)
no-latency-control sacrifice latency to improve bandwidth benchmarks
wrap= restart counting channel numbers after this number (for testing)
D,daemon run in the background as a daemon
+V,version print sshuttle's version number
syslog send log messages to syslog (default if you use --daemon)
pidfile= pidfile name (only if using --daemon) [./sshuttle.pid]
server (internal use only)
@@ -72,6 +73,10 @@ hostwatch (internal use only)
o = options.Options(optspec)
(opt, flags, extra) = o.parse(sys.argv[2:])
+if opt.version:
+ import version
+ print version.TAG
+ sys.exit(0)
if opt.daemon:
opt.syslog = 1
if opt.wrap: