pinebuds/download.sh

15 lines
617 B
Bash
Raw Normal View History

#!/usr/bin/env bash
2022-08-15 20:30:33 -05:00
2023-02-20 04:13:03 -06:00
num=$(find /dev -name 'ttyACM*' | sort | rev | cut -c 1)
2023-02-19 19:18:39 -06:00
echo com is: "$num"
mapfile -t splitPorts <<< "$num"
2022-12-30 05:27:18 -06:00
echo "This tool assumes your buds are the only thing connected and are enumerated {right,left} order. YMMV"
echo "Right bud is at ${splitPorts[0]}"
echo "Left bud is at ${splitPorts[1]}"
echo "Please disconnect and reconnect the bud on the right"
2023-02-19 19:18:39 -06:00
bestool write-image out/open_source/open_source.bin --port "/dev/ttyACM${splitPorts[0]}"
2022-12-30 05:27:18 -06:00
echo "Please disconnect and reconnect the bud on the left"
2023-02-19 19:18:39 -06:00
bestool write-image out/open_source/open_source.bin --port "/dev/ttyACM${splitPorts[1]}"