hysteria

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

commit 32393c71f42d6626ed9a305fa05b89fc1c0dfbf4
parent d8f665bbf4c089e670d9c4e1b74ce41a0e9c98a0
Author: sin <sin@2f30.org>
Date:   Tue Apr 15 10:21:51 +0100

Rename join to autojoin

Diffstat:
autojoin | 20++++++++++++++++++++
hysteria | 2+-
join | 20--------------------
3 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/autojoin b/autojoin @@ -0,0 +1,20 @@ +#!/bin/sh + +if test $# -lt 2; then + echo "usage: $(basename $0) host channel..." 1>&2 + exit 1 +fi + +tmux list-sessions -F '#S' 2>/dev/null | \ + grep '^hysteria' >/dev/null 2>/dev/null +if [ $? -eq 1 ]; then + echo no hysteria session running 1>&2 + exit 1 +fi + +host=$(echo $1 | awk -F: '{print $1}') +shift +for c in $*; do + echo "/join $c" > "irc/$host/in" + ./waitfile "irc/$host/$c/out" +done diff --git a/hysteria b/hysteria @@ -13,5 +13,5 @@ done for c in $channels; do host=$(echo $c | awk -F: '{print $1}') channel=$(echo $c | awk -F: '{print $2}') - ./join $host $channel + ./autojoin $host $channel done diff --git a/join b/join @@ -1,20 +0,0 @@ -#!/bin/sh - -if test $# -lt 2; then - echo "usage: $(basename $0) host channel..." 1>&2 - exit 1 -fi - -tmux list-sessions -F '#S' 2>/dev/null | \ - grep '^hysteria' >/dev/null 2>/dev/null -if [ $? -eq 1 ]; then - echo no hysteria session running 1>&2 - exit 1 -fi - -host=$(echo $1 | awk -F: '{print $1}') -shift -for c in $*; do - echo "/join $c" > "irc/$host/in" - ./waitfile "irc/$host/$c/out" -done