diff --git a/hardware/panelize.sh b/hardware/panelize.sh index 254f7d2..e2cfbe6 100644 --- a/hardware/panelize.sh +++ b/hardware/panelize.sh @@ -2,8 +2,10 @@ MODULE=${1%/} OUTPUT=$2 +PANELIZE=$3 SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) MODULE_DIR="${SCRIPT_DIR}/${MODULE}" +PCB="${MODULE_DIR}/${MODULE}.kicad_pcb" if [ -z "$MODULE" ]; then echo "Usage: $0 [output-dir]" @@ -14,5 +16,8 @@ if [ -z "$OUTPUT" ]; then OUTPUT=$HOME/pdusb-panelized fi -kikit panelize -p "${MODULE_DIR}/panelize.json" -p :jlcTooling "${MODULE_DIR}/${MODULE}.kicad_pcb" "$OUTPUT/panel.kicad_pcb" -kikit fab jlcpcb --no-drc --assembly --schematic "${MODULE_DIR}/${MODULE}.kicad_sch" "$OUTPUT/panel.kicad_pcb" "$OUTPUT/" \ No newline at end of file +if [ -z "$PANELIZE" ]; then + kikit panelize -p "${MODULE_DIR}/panelize.json" -p :jlcTooling "${MODULE_DIR}/${MODULE}.kicad_pcb" "$OUTPUT/panel.kicad_pcb" + PCB="$OUTPUT/panel.kicad_pcb" +fi +kikit fab jlcpcb --no-drc --assembly --schematic "${MODULE_DIR}/${MODULE}.kicad_sch" "$PCB" "$OUTPUT/" \ No newline at end of file