Switch to find over ls -l

This commit is contained in:
Finlay Davidson 2023-02-20 11:13:03 +01:00
parent b1de7e0d20
commit 49f3e2a10c
4 changed files with 7 additions and 6 deletions

View File

@ -6,7 +6,7 @@ mkdir -p "$BKPPATH"
NOW=$(date +%s) NOW=$(date +%s)
num=$(ls -l /dev/ttyACM* | rev | cut -c 1) num=$(find /dev -name 'ttyACM*' | sort | rev | cut -c 1)
echo com is: "$num" echo com is: "$num"
mapfile -t splitPorts <<< "$num" mapfile -t splitPorts <<< "$num"
echo "This tool assumes your buds are the only thing connected and are enumerated {right,left} order. YMMV" echo "This tool assumes your buds are the only thing connected and are enumerated {right,left} order. YMMV"

View File

@ -1,2 +1,3 @@
#!/bin/bash #!/bin/sh
make T=open_source -j DEBUG=1 clean
make -j "$(nproc)" T=open_source DEBUG=1 clean

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
num=$(ls -l /dev/ttyACM* | rev | cut -c 1) num=$(find /dev -name 'ttyACM*' | sort | rev | cut -c 1)
echo com is: "$num" echo com is: "$num"
mapfile -t splitPorts <<< "$num" mapfile -t splitPorts <<< "$num"
echo "This tool assumes your buds are the only thing connected and are enumerated {right,left} order. YMMV" echo "This tool assumes your buds are the only thing connected and are enumerated {right,left} order. YMMV"

View File

@ -1,5 +1,5 @@
#! /bin/bash #!/bin/sh
num=$(ls -l /dev/ttyUSB* | rev | cut -c 1) num=$(find /dev -name 'ttyUSB*' | rev | cut -c 1)
echo "$num" echo "$num"
sudo minicom "port$num" sudo minicom "port$num"