Skip to content

Commit

Permalink
Add a --version (-V) option.
Browse files Browse the repository at this point in the history
Now that we imported the feature from redo, might as well use it.
  • Loading branch information
apenwarr committed Jan 6, 2012
1 parent cbc32ff commit 41d1f73
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion all.do
@@ -1,7 +1,7 @@
exec >&2 exec >&2
UI= UI=
[ "$(uname)" = "Darwin" ] && UI=ui-macos/all [ "$(uname)" = "Darwin" ] && UI=ui-macos/all
redo-ifchange Documentation/all $UI redo-ifchange Documentation/all version/all $UI


echo echo
echo "What now?" echo "What now?"
Expand Down
5 changes: 5 additions & 0 deletions main.py
Expand Up @@ -63,6 +63,7 @@ def parse_ipport(s):
no-latency-control sacrifice latency to improve bandwidth benchmarks no-latency-control sacrifice latency to improve bandwidth benchmarks
wrap= restart counting channel numbers after this number (for testing) wrap= restart counting channel numbers after this number (for testing)
D,daemon run in the background as a daemon 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) syslog send log messages to syslog (default if you use --daemon)
pidfile= pidfile name (only if using --daemon) [./sshuttle.pid] pidfile= pidfile name (only if using --daemon) [./sshuttle.pid]
server (internal use only) server (internal use only)
Expand All @@ -72,6 +73,10 @@ def parse_ipport(s):
o = options.Options(optspec) o = options.Options(optspec)
(opt, flags, extra) = o.parse(sys.argv[2:]) (opt, flags, extra) = o.parse(sys.argv[2:])


if opt.version:
import version
print version.TAG
sys.exit(0)
if opt.daemon: if opt.daemon:
opt.syslog = 1 opt.syslog = 1
if opt.wrap: if opt.wrap:
Expand Down

0 comments on commit 41d1f73

Please sign in to comment.