Permalink
Browse files

update shell scripts to handle lowercase OK

  • Loading branch information...
1 parent 632ddaa commit 22dbf8658aa2e7f0ae44af6eb6953645a0d2b735 @triffid committed Sep 11, 2010
Showing with 5 additions and 6 deletions.
  1. +3 −3 func.sh
  2. +2 −3 sender.sh
View
@@ -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
@@ -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

0 comments on commit 22dbf86

Please sign in to comment.