hysteria

ii wrapper script
git clone git://git.2f30.org/hysteria
Log | Files | Refs | README | LICENSE

commit a6a03f0eb4124d4560619486454b28238aaa7cdf
parent 43b5ee723df1a9b13a5d97de7aff780da48c1b31
Author: sin <sin@2f30.org>
Date:   Wed, 29 Oct 2014 14:30:46 +0000

Source after checking for proper invocation

Diffstat:
Mhysteria-autojoin | 10+++++-----
Mhysteria-connect | 10+++++-----
2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/hysteria-autojoin b/hysteria-autojoin @@ -1,16 +1,16 @@ #!/bin/sh +if test $# -lt 2; then + echo "usage: $(basename $0) host channel [config]" 1>&2 + exit 1 +fi + if [ "$3" = "" ]; then . "$HOME/.hysteria/config" else . "$3" fi -if test $# -lt 2; then - echo "usage: $(basename $0) host channel [config]" 1>&2 - exit 1 -fi - tmux list-sessions -F '#S' 2>/dev/null | \ grep "^$session$" >/dev/null 2>/dev/null if [ $? -eq 1 ]; then diff --git a/hysteria-connect b/hysteria-connect @@ -1,16 +1,16 @@ #!/bin/sh +if test -z $1; then + echo "usage: $(basename $0) host [config]" 1>&2 + exit 1 +fi + if [ "$2" = "" ]; then . "$HOME/.hysteria/config" else . "$2" fi -if test -z $1; then - echo "usage: $(basename $0) host [config]" 1>&2 - exit 1 -fi - tmux list-sessions -F '#S' 2>/dev/null | \ grep "^$session$" >/dev/null 2>/dev/null if [ $? -eq 1 ]; then