new protocol support for host-side debugging functions
This commit is contained in:
parent
d57dc22c04
commit
d43adfd729
15
func.sh
15
func.sh
|
|
@ -108,14 +108,12 @@ mendel_cmd() {
|
||||||
local RSC=0
|
local RSC=0
|
||||||
local cmd="$*"
|
local cmd="$*"
|
||||||
echo "$cmd" >&3;
|
echo "$cmd" >&3;
|
||||||
while [ "$REPLY" != "OK" ] && [ "$REPLY" != "ok" ]
|
local REPLY=""
|
||||||
|
while ! [[ "$REPLY" =~ ^OK ]] && ! [[ "$REPLY" =~ ^ok ]]
|
||||||
do
|
do
|
||||||
read -u 3
|
read -u 3
|
||||||
if [ "$REPLY" != "OK" ] && [ "$REPLY" != "ok" ]
|
echo "${REPLY##ok }"
|
||||||
then
|
if [[ "$REPLY" =~ ^RESEND ]] || [[ "$REPLY" =~ ^rs ]]
|
||||||
echo "$REPLY"
|
|
||||||
fi
|
|
||||||
if [[ "$REPLY" =~ ^RESEND ]]
|
|
||||||
then
|
then
|
||||||
if [ "$RSC" -le 3 ]
|
if [ "$RSC" -le 3 ]
|
||||||
then
|
then
|
||||||
|
|
@ -137,11 +135,12 @@ mendel_cmd_hr() {
|
||||||
local RSC=0
|
local RSC=0
|
||||||
echo "$cmd" >&3
|
echo "$cmd" >&3
|
||||||
echo "S> $cmd"
|
echo "S> $cmd"
|
||||||
while [ "$REPLY" != "OK" ] && [ "$REPLY" != "ok" ]
|
local REPLY=""
|
||||||
|
while ! [[ "$REPLY" =~ ^OK ]] && ! [[ "$REPLY" =~ ^ok ]]
|
||||||
do
|
do
|
||||||
read -u 3
|
read -u 3
|
||||||
echo "<R $REPLY"
|
echo "<R $REPLY"
|
||||||
if [[ "$REPLY" =~ ^RESEND ]]
|
if [[ "$REPLY" =~ ^RESEND ]] || [[ "$REPLY" =~ ^rs ]]
|
||||||
then
|
then
|
||||||
if [ "$RSC" -le 3 ]
|
if [ "$RSC" -le 3 ]
|
||||||
then
|
then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue