esp_ota_example/otaflash.sh

19 lines
328 B
Bash
Raw Normal View History

2022-07-25 11:59:05 +00:00
#!/bin/bash
do_this_on_ctrl_c(){
echo "Stopped searching!"
exit 0
}
trap 'do_this_on_ctrl_c' SIGINT
printf "ip: %s" "$1"
printf "\n%s" "waiting for Device ..."
while ! ping -c 1 -n -w 1 $1 &> /dev/null
do
printf "%c" "."
done
printf "\n%s\n" "Device is online"
2024-08-08 21:15:58 +00:00
pio run -t upload -e d1_mini-ota --upload-port $1
2022-07-25 11:59:05 +00:00