dot

packages and services management
Log | Files | Refs | README

commit 9feabb66d6830c1152e1685d80668205b5e41fd6
parent 47c63792c1f3f31de2b97af8774f2f9095f4934d
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sat, 16 Jun 2018 22:41:35 +0200

convert the script to sh

Diffstat:
Muser/irc/attach | 21+++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/user/irc/attach b/user/irc/attach @@ -1,15 +1,16 @@ -#!/9/bin/rc -e +#!/bin/sh -e ifs=' ' -fn sigint {} +trap 'true' SIGINT - -while (true) { - c=`{exec ls -d ./out */out */*/out | exec sed 's,/out,,' | exec iomenu} - if (~ $#c 1) switch (`{exec printf '%s\n' view chat | exec iomenu}) { - case view +while true +do c=$(exec ls -d ./out */out */*/out | exec sed 's,/out,,' | exec iomenu) + test "$c" && case $(exec printf '%s\n' view chat | exec iomenu) in + (view) eel <$c/out | less - case chat + ;; + (chat) exec tail -f -n 80 $c/out | exec eel | shuntty $c'> ' >$c/in - } -} + ;; + esac +done