Update yq, fix bug in pinout generation #4977

revert
This commit is contained in:
rusefillc 2023-01-17 23:25:27 -05:00
parent a2d9fddb78
commit 0eeee7e837
2 changed files with 3 additions and 4 deletions

View File

@ -33,9 +33,9 @@ for c in $CONNECTORS; do
# todo fail once all pages are compliant exit 1
fi
if [ -f $DIR/index.html ]; then
bash misc/pinout-gen/append.sh "$(yqdir/yq -o=json e $c)" $DIR/index.html
bash misc/pinout-gen/append.sh "$(yqdir/yq -j e $c)" $DIR/index.html
else
bash misc/pinout-gen/gen.sh "$(yqdir/yq -o=json e $c)" $DIR/index.html
bash misc/pinout-gen/gen.sh "$(yqdir/yq -j e $c)" $DIR/index.html
fi
if [ $? -ne 0 ]; then
echo "${I_AM} something is broken"

View File

@ -1,8 +1,7 @@
#!/usr/bin/env bash
DIR=$(cd -P -- "$(dirname -- "$0")" && pwd -P)"/"
JSON="$(echo $1 | sed 's/\\/\\\\\\\\/g')"
TEXT=$(sed -e "/###CSS###/{r ${DIR}style.css" -e 'd}' -e "/###JS###/{r ${DIR}script.js" -e 'd}' ${DIR}pinout.html | sed -e "s/\/\/\/DATA\/\/\//\`$(echo ${JSON//\//\\/} | tr -d '\n')\`,\n\/\/\/DATA\/\/\//")
TEXT=$(sed -e "/###CSS###/{r ${DIR}style.css" -e 'd}' -e "/###JS###/{r ${DIR}script.js" -e 'd}' ${DIR}pinout.html | sed -e "s/\/\/\/DATA\/\/\//\`$(echo ${1//\//\\/} | tr -d '\n')\`,\n\/\/\/DATA\/\/\//")
if [ $? -ne 0 ]; then
echo "Error in gen.sh"
exit 1;