2024-08-07 21:01:54 +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-29 16:03:46 +00:00
|
|
|
pio run -t upload --upload-port $1 -e d1_mini-ota
|
2024-08-07 21:01:54 +00:00
|
|
|
|