split up tests; does not support &&

master
amelia 8 months ago
parent 79c6b1beaa
commit 41486791e5

@ -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"

Loading…
Cancel
Save