step2 & step3 automation

This commit is contained in:
andreika-git 2022-05-21 19:04:24 +03:00
parent 7ef7b566dd
commit 016c2a29a0
2 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,23 @@
#!/bin/bash
if [ ! -f hellen-one/git_scripts ]; then
echo "No submodules?"
git submodule update --init --recursive
fi
# This command is me trying to be fancy
# '--entrypoint python3' skips the normal container CMD and starts python3 instead
# using the parameters specified after 'hellen-one'
#
# -v "$(pwd)":/${PWD##*/} simply mounts the current working directory
# at /<the name of the current directory>
#
# '/${PWD##*/}' is doing the $pwd basename thing again
source revision.txt
echo "BOARD_REVISION=[${BOARD_REVISION}]"
docker run --rm -t --user $(id -u):$(id -g) --entrypoint python3 -v "$(pwd)":/${PWD##*/} hellen-one ./bin/copy_from_Kicad.py "frames:${BOARD_PREFIX}" "/${PWD##*/}" "../../gerber" "${BOARD_SUFFIX}" "${BOARD_REVISION}"
echo "Done!"

View File

@ -0,0 +1,14 @@
#!/bin/bash
if [ ! -f hellen-one/git_scripts ]; then
echo "No submodules?"
git submodule update --init --recursive
fi
# See step2_copy_with_docker.sh for explanation of the following command
source revision.txt
echo "BOARD_REVISION=[${BOARD_REVISION}]"
docker run --rm -t --user $(id -u):$(id -g) --entrypoint bash -v "$(pwd)":/${PWD##*/} hellen-one ./bin/create_board_with_prefix.sh "${BOARD_PREFIX}" "/${PWD##*/}" "${BOARD_SUFFIX}" "${BOARD_REVISION}" "bom_replace_${BOARD_PREFIX}${BOARD_SUFFIX}-${BOARD_REVISION}.csv " "${BOARD_PCB_OFFSET}"