#!/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"