hbbs

bbs.hlirc.net
Log | Files | Refs | README | LICENSE

commit 3165ea1e4838e7ddbed00ce63e0ba6a659b94e32
parent 4ea5fcfa5dc9c9954bb0a8538e588c9c4f0ec533
Author: hhvn <hayden@haydenvh.com>
Date:   Mon,  1 Feb 2021 12:59:38 +0000

bin/interface.sh: while loop causes bug on server

Diffstat:
Mbin/interface.sh | 14++++----------
1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/bin/interface.sh b/bin/interface.sh @@ -111,11 +111,8 @@ menu_list(){ file="$datadir/boards/$board/$(echo "$(find $datadir/boards/$board/ -type f | wc -l) + 1" | bc).post" cat > $file save="" - while [ "$save" != "y" ] && [ "$save" != "n" ] - do - prompt "Save mesage (${k}y${s}/${k}n${s})" save - done - [ "$save" = "n" ] && { + prompt "Save mesage (${k}y${s}/${k}n${s})" save + [ "$save" != "y" ] && { info "didn't save message" anykey break @@ -191,11 +188,8 @@ menu_read(){ file="$datadir/boards/$board/$(echo "$(find $datadir/boards/$board/ -type f | wc -l) + 1" | bc).post" cat > $file save="" - while [ "$save" != "y" ] && [ "$save" != "n" ] - do - prompt "Save mesage (${k}y${s}/${k}n${s})" save - done - [ "$save" = "n" ] && { + prompt "Save mesage (${k}y${s}/${k}n${s})" save + [ "$save" != "y" ] && { info "didn't save message" anykey break