summaryrefslogtreecommitdiff
path: root/tools/build.sh
blob: 788e67a7c6def20f6385dafbaf630e0dd2a014f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/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"
board="${pcb}/iot-contact.kicad_pcb"


mkdir -pv "${build}/${pcb}"

kicad-cli sch export pdf \
	--output "${build}/${schematic}.pdf" \
	--black-and-white \
	"${src}/${schematic}"

kicad-cli pcb export pdf \
	--output "${build}/${board}.pdf" \
	--layers F.Cu,Edge.Cuts \
	--include-border-title \
	--black-and-white \
	"${src}/${board}"