From 22dbf8658aa2e7f0ae44af6eb6953645a0d2b735 Mon Sep 17 00:00:00 2001 From: Michael Moon Date: Sat, 11 Sep 2010 22:44:19 +1000 Subject: [PATCH] update shell scripts to handle lowercase OK --- func.sh | 6 +++--- sender.sh | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/func.sh b/func.sh index ec1726f..ba6cb30 100755 --- a/func.sh +++ b/func.sh @@ -108,10 +108,10 @@ mendel_cmd() { local RSC=0 local cmd="$*" echo "$cmd" >&3; - while [ "$REPLY" != "OK" ] + while [ "$REPLY" != "OK" ] && [ "$REPLY" != "ok" ] do read -u 3 - if [ "$REPLY" != "OK" ] + if [ "$REPLY" != "OK" ] && [ "$REPLY" != "ok" ] then echo "$REPLY" fi @@ -137,7 +137,7 @@ mendel_cmd_hr() { local RSC=0 echo "$cmd" >&3 echo "S> $cmd" - while [ "$REPLY" != "OK" ] + while [ "$REPLY" != "OK" ] && [ "$REPLY" != "ok" ] do read -u 3 echo " $REPLY" echo "$REPLY" >&3 fi - while [ "$REPLY" != "OK" ] + while [ "$REPLY" != "OK" ] && [ "$REPLY" != "ok" ] do read -s -u 3 echo "< $REPLY" done - read -t 1 - RV=$? + read -t 1; RV=$? done ) 3<>$DEV