|
|
@ -46,7 +46,7 @@ exec < "${DEVICE}"
|
|
|
|
# shellcheck disable=SC2086 # intentional word splitting
|
|
|
|
# shellcheck disable=SC2086 # intentional word splitting
|
|
|
|
stty $STTY_ARGS
|
|
|
|
stty $STTY_ARGS
|
|
|
|
|
|
|
|
|
|
|
|
wait_dot () {
|
|
|
|
read_reply () {
|
|
|
|
while read -r line; do
|
|
|
|
while read -r line; do
|
|
|
|
if [ "${line}" = "." ]; then
|
|
|
|
if [ "${line}" = "." ]; then
|
|
|
|
break
|
|
|
|
break
|
|
|
@ -58,6 +58,6 @@ wait_dot () {
|
|
|
|
# Flush any invalid commands out of input buffer.
|
|
|
|
# Flush any invalid commands out of input buffer.
|
|
|
|
# This could happen after a failed upload.
|
|
|
|
# This could happen after a failed upload.
|
|
|
|
echo ' ' > "${DEVICE}"
|
|
|
|
echo ' ' > "${DEVICE}"
|
|
|
|
wait_dot
|
|
|
|
read_reply > /dev/null
|
|
|
|
echo "$@" >"${DEVICE}"
|
|
|
|
echo "$@" >"${DEVICE}"
|
|
|
|
wait_dot
|
|
|
|
read_reply
|
|
|
|