summaryrefslogtreecommitdiff
path: root/tools/build.sh
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2024-06-05 19:45:11 +0200
committerxengineering <me@xengineering.eu>2024-06-05 19:45:11 +0200
commite6fc87d14aa2fcf30812b6b7bccd35dd3026631e (patch)
treef3eefb70f0cf1479657e73f0e5a75c9312b5d84c /tools/build.sh
parent69d66f534ca25bce98ee1984325149891f27f76c (diff)
downloadiot-contact-e6fc87d14aa2fcf30812b6b7bccd35dd3026631e.tar
iot-contact-e6fc87d14aa2fcf30812b6b7bccd35dd3026631e.tar.zst
iot-contact-e6fc87d14aa2fcf30812b6b7bccd35dd3026631e.zip
tools: Add build.sh to export PDF schematics
Diffstat (limited to 'tools/build.sh')
-rwxr-xr-xtools/build.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/build.sh b/tools/build.sh
new file mode 100755
index 0000000..89aa193
--- /dev/null
+++ b/tools/build.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+
+set -euf
+
+
+# absolute paths
+script="$(realpath $0)"
+tools="$(dirname "${script}")"
+src="$(dirname "${tools}")"
+build="${src}/build"
+
+# paths relative to the build or src folder
+pcb='pcb'
+schematic="${pcb}/iot-contact.kicad_sch"
+
+
+mkdir -pv "${build}/${pcb}"
+kicad-cli sch export pdf \
+ --output "${build}/${schematic}.pdf" \
+ --black-and-white \
+ "${src}/${schematic}"