From 41486791e5f2d7b0dbd3c53af144e47c6ff49515 Mon Sep 17 00:00:00 2001 From: amelia Date: Wed, 30 Aug 2023 23:18:11 -0500 Subject: [PATCH] split up tests; does not support && --- deck.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deck.sh b/deck.sh index d2e94d5..f573427 100755 --- a/deck.sh +++ b/deck.sh @@ -88,13 +88,13 @@ relamove() { } menumove() { - if [ "$1" -lt 0 && $(($MENUPOS - $1)) -lt $MENUSIZE ]; then + if [ "$1" -lt 0 ] && [ $(($MENUPOS - $1)) -lt $MENUSIZE ]; then printf " " relamove -1 $1 printf "*" relamove -1 0 MENUPOS=$(($MENUPOS - $1)) - elif [ "$1" -gt 0 && $(($MENUPOS - $1)) -ge 0 ]; then + elif [ "$1" -gt 0 ] && [ $(($MENUPOS - $1)) -ge 0 ]; then printf " " relamove -1 $1 printf "*" @@ -132,9 +132,9 @@ split_ls2() { drawmenu() { # initialize menu only. too expensize to do each time IFS="|" - if [ "$1" = "Back" && "$(length $MENUSTACK)" -gt 1 ]; then + if [ "$1" = "Back" ] && [ "$(length $MENUSTACK)" -gt 1 ]; then deleteFirst $MENUSTACK - elif [ $(getNth 0 "$MENUSTACK") != "$1" && "$1" != "Back" && "$MODE" = "" ]; then + elif [ $(getNth 0 "$MENUSTACK") != "$1" ] && [ "$1" != "Back" ] && [ "$MODE" = "" ]; then addFirst $1 logprint "Adding $1" logprint "State: $MENUSTACK"