update shell scripts to handle lowercase OK

This commit is contained in:
Michael Moon 2010-09-11 22:44:19 +10:00
parent 632ddaa216
commit 22dbf8658a
2 changed files with 5 additions and 6 deletions

View File

@ -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 "<R $REPLY"

View File

@ -15,12 +15,11 @@ stty $BAUD raw ignbrk -hup -echo ixon < $DEV
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