diff --git a/bin/step2_copy_with_docker.sh b/bin/step2_copy_with_docker.sh index 3bf3d06..2bbdd14 100644 --- a/bin/step2_copy_with_docker.sh +++ b/bin/step2_copy_with_docker.sh @@ -16,6 +16,17 @@ fi # '/${PWD##*/}' is doing the $pwd basename thing again source revision.txt + +if [ -z "${BOARD_PREFIX}" ]; then + echo "Error! BOARD_PREFIX is not set!" + exit 1 +fi + +if [ -z "${BOARD_SUFFIX}" ]; then + echo "Error! BOARD_SUFFIX is not set!" + exit 2 +fi + 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}" diff --git a/bin/step3_create_board_with_docker.sh b/bin/step3_create_board_with_docker.sh index 304344e..0486850 100644 --- a/bin/step3_create_board_with_docker.sh +++ b/bin/step3_create_board_with_docker.sh @@ -8,6 +8,17 @@ fi # See step2_copy_with_docker.sh for explanation of the following command source revision.txt + +if [ -z "${BOARD_PREFIX}" ]; then + echo "Error! BOARD_PREFIX is not set!" + exit 1 +fi + +if [ -z "${BOARD_SUFFIX}" ]; then + echo "Error! BOARD_SUFFIX is not set!" + exit 2 +fi + 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}"