update shell scripts to handle lowercase OK
This commit is contained in:
parent
632ddaa216
commit
22dbf8658a
6
func.sh
6
func.sh
|
|
@ -108,10 +108,10 @@ mendel_cmd() {
|
||||||
local RSC=0
|
local RSC=0
|
||||||
local cmd="$*"
|
local cmd="$*"
|
||||||
echo "$cmd" >&3;
|
echo "$cmd" >&3;
|
||||||
while [ "$REPLY" != "OK" ]
|
while [ "$REPLY" != "OK" ] && [ "$REPLY" != "ok" ]
|
||||||
do
|
do
|
||||||
read -u 3
|
read -u 3
|
||||||
if [ "$REPLY" != "OK" ]
|
if [ "$REPLY" != "OK" ] && [ "$REPLY" != "ok" ]
|
||||||
then
|
then
|
||||||
echo "$REPLY"
|
echo "$REPLY"
|
||||||
fi
|
fi
|
||||||
|
|
@ -137,7 +137,7 @@ mendel_cmd_hr() {
|
||||||
local RSC=0
|
local RSC=0
|
||||||
echo "$cmd" >&3
|
echo "$cmd" >&3
|
||||||
echo "S> $cmd"
|
echo "S> $cmd"
|
||||||
while [ "$REPLY" != "OK" ]
|
while [ "$REPLY" != "OK" ] && [ "$REPLY" != "ok" ]
|
||||||
do
|
do
|
||||||
read -u 3
|
read -u 3
|
||||||
echo "<R $REPLY"
|
echo "<R $REPLY"
|
||||||
|
|
|
||||||
|
|
@ -15,12 +15,11 @@ stty $BAUD raw ignbrk -hup -echo ixon < $DEV
|
||||||
echo "> $REPLY"
|
echo "> $REPLY"
|
||||||
echo "$REPLY" >&3
|
echo "$REPLY" >&3
|
||||||
fi
|
fi
|
||||||
while [ "$REPLY" != "OK" ]
|
while [ "$REPLY" != "OK" ] && [ "$REPLY" != "ok" ]
|
||||||
do
|
do
|
||||||
read -s -u 3
|
read -s -u 3
|
||||||
echo "< $REPLY"
|
echo "< $REPLY"
|
||||||
done
|
done
|
||||||
read -t 1
|
read -t 1; RV=$?
|
||||||
RV=$?
|
|
||||||
done
|
done
|
||||||
) 3<>$DEV
|
) 3<>$DEV
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue