mirror of https://github.com/FOME-Tech/fome-fw.git
parent
3e400fdfbf
commit
d8b2565741
|
@ -364,6 +364,7 @@ info:
|
||||||
name: Main Connector
|
name: Main Connector
|
||||||
board_url: https://rusefi.com/s/microrusefi
|
board_url: https://rusefi.com/s/microrusefi
|
||||||
id: main
|
id: main
|
||||||
|
order: 0
|
||||||
image:
|
image:
|
||||||
file: main.jpg
|
file: main.jpg
|
||||||
pins:
|
pins:
|
||||||
|
|
|
@ -4,16 +4,23 @@ I_AM="pinouts-create.sh:"
|
||||||
|
|
||||||
I_AM="gen_upload_pinouts.sh:"
|
I_AM="gen_upload_pinouts.sh:"
|
||||||
|
|
||||||
if [ -z $1 ] ; then
|
|
||||||
echo "Specific yaml parameter not specified, searching for */connectors/*.yaml"
|
|
||||||
CONNECTORS=$(find -path "./firmware/config/boards/*/connectors/*.yaml")
|
|
||||||
else
|
|
||||||
CONNECTORS=$1
|
|
||||||
echo "Processing $CONNECTORS"
|
|
||||||
fi
|
|
||||||
# yq 3 and 4 have incompatible syntax. We use yq 4.
|
# yq 3 and 4 have incompatible syntax. We use yq 4.
|
||||||
echo ${I_AM} invoking yq version
|
echo ${I_AM} invoking yq version
|
||||||
yqdir/yq -V
|
yqdir/yq -V
|
||||||
|
|
||||||
|
if [ -z $1 ] ; then
|
||||||
|
echo "Specific yaml parameter not specified, searching for */connectors/*.yaml"
|
||||||
|
CONNECTORS=$(find -path "./firmware/config/boards/*/connectors/*.yaml")
|
||||||
|
FILES=$(for f in $CONNECTORS; do
|
||||||
|
ORDER=$(yqdir/yq e '.info.order' $f)
|
||||||
|
echo "$f $ORDER"
|
||||||
|
done)
|
||||||
|
CONNECTORS=$(echo "$FILES" | sort -k2 | cut -d ' ' -f 1)
|
||||||
|
else
|
||||||
|
CONNECTORS=$1
|
||||||
|
echo "Processing $CONNECTORS"
|
||||||
|
fi
|
||||||
|
|
||||||
for c in $CONNECTORS; do
|
for c in $CONNECTORS; do
|
||||||
echo "${I_AM} processing "$c
|
echo "${I_AM} processing "$c
|
||||||
DIR="pinouts/"$(echo $c | tr '/' '\n' | tail -n +5 | head -n -2 | tr '\n' '/')
|
DIR="pinouts/"$(echo $c | tr '/' '\n' | tail -n +5 | head -n -2 | tr '\n' '/')
|
||||||
|
|
Loading…
Reference in New Issue