pinebuds/download.sh

16 lines
575 B
Bash
Raw Normal View History

2022-08-15 20:30:33 -05:00
#! /bin/bash
2022-12-30 05:27:18 -06:00
num=$(ls -l /dev/ttyACM* | rev | cut -c 1)
2022-08-15 20:30:33 -05:00
echo com is:$num
2022-12-30 05:27:18 -06:00
splitPorts=($num)
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"
bestool write-image out/open_source/open_source.bin --port /dev/ttyACM${splitPorts[0]}
echo "Please disconnect and reconnect the bud on the left"
bestool write-image out/open_source/open_source.bin --port /dev/ttyACM${splitPorts[1]}