Skip to content

Commit

Permalink
fix selection for serial ports
Browse files Browse the repository at this point in the history
  • Loading branch information
Szybet committed May 26, 2024
1 parent 7640b2f commit b70a30c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion resources/tools/globalFunctions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ get_pio_env() {
extract_serial_port() {
local esptool_path=$1
local output
local last_port

output=$("$esptool_path" flash_id 2>&1)
echo "$output" | grep "Serial port" | awk '{print $3}'
last_port=$(echo "$output" | grep "Serial port" | awk '{print $3}' | tail -n 1)
echo -n "$last_port"
}

0 comments on commit b70a30c

Please sign in to comment.