Skip to content

Commit 41d1f73

Browse files
committed
Add a --version (-V) option.
Now that we imported the feature from redo, might as well use it.
1 parent cbc32ff commit 41d1f73

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

all.do

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
exec >&2
22
UI=
33
[ "$(uname)" = "Darwin" ] && UI=ui-macos/all
4-
redo-ifchange Documentation/all $UI
4+
redo-ifchange Documentation/all version/all $UI
55

66
echo
77
echo "What now?"

main.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def parse_ipport(s):
6363
no-latency-control sacrifice latency to improve bandwidth benchmarks
6464
wrap= restart counting channel numbers after this number (for testing)
6565
D,daemon run in the background as a daemon
66+
V,version print sshuttle's version number
6667
syslog send log messages to syslog (default if you use --daemon)
6768
pidfile= pidfile name (only if using --daemon) [./sshuttle.pid]
6869
server (internal use only)
@@ -72,6 +73,10 @@ def parse_ipport(s):
7273
o = options.Options(optspec)
7374
(opt, flags, extra) = o.parse(sys.argv[2:])
7475

76+
if opt.version:
77+
import version
78+
print version.TAG
79+
sys.exit(0)
7580
if opt.daemon:
7681
opt.syslog = 1
7782
if opt.wrap:

0 commit comments

Comments
 (0)