move prompt before flashing back into the flash target

tmp/arduino-cli-pre-rebase
Jesse Vincent 4 years ago
parent 955c0a2043
commit b528e01a1e
No known key found for this signature in database
GPG Key ID: CC228463465E40BC

@ -169,7 +169,15 @@ _find_sketch() {
exit 1 exit 1
} }
_prompt_before_flashing() { }
cmd_flash() {
_set_up_environment
#TODO (arduino team) I'd love to do this with their json output
#but it's short some of the data we kind of need
port=$(_run_arduino_cli board list --format=text | grep "$FQBN" |cut -d' ' -f 1)
flashing_instructions=$(_arduino_prop 'build.flashing_instructions') flashing_instructions=$(_arduino_prop 'build.flashing_instructions')
: "${flashing_instructions:="If your keyboard needs you to do something to put it in flashing mode, do that now."}" : "${flashing_instructions:="If your keyboard needs you to do something to put it in flashing mode, do that now."}"
@ -179,15 +187,7 @@ _prompt_before_flashing() {
# We do not want to permit line continuations here. We just want a newline. # We do not want to permit line continuations here. We just want a newline.
# shellcheck disable=SC2162 # shellcheck disable=SC2162
read read
}
cmd_flash() {
_set_up_environment
#TODO (arduino team) I'd love to do this with their json output
#but it's short some of the data we kind of need
port=$(_run_arduino_cli board list --format=text | grep "$FQBN" |cut -d' ' -f 1)
_prompt_before_flashing
_run_arduino_cli upload --fqbn "${FQBN}" --port "${port}" "${ARDUINO_VERBOSE}" _run_arduino_cli upload --fqbn "${FQBN}" --port "${port}" "${ARDUINO_VERBOSE}"
} }

Loading…
Cancel
Save