summaryrefslogtreecommitdiff
path: root/pcb/print-bom.sh
blob: 9bd8007dd39ba0d08e4efbfa33f88f24e16f895e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh


set -euf


SCRIPT_PATH="$0"
PCB_PATH="$(dirname "${SCRIPT_PATH}")"
INPUT_PATH="${PCB_PATH}/soundbox.kicad_sch"
OUTPUT_PATH="$(mktemp -t --suffix '.csv' kicad-bom-XXXX)"

FIELDS='Reference,Description,Value'


kicad-cli sch export bom \
	-o "$OUTPUT_PATH" \
	--fields "$FIELDS" \
	"$INPUT_PATH"

cat "$OUTPUT_PATH"
rm "$OUTPUT_PATH"