1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-25 21:11:53 +02:00

added small bash script to test kicad cmdline patches

This commit is contained in:
Wolfgang Spraul 2012-01-08 22:00:56 +01:00
parent 41a65ca819
commit 4d628c3787

View File

@ -0,0 +1,156 @@
#!/bin/bash
# path relative to ./ben-wpan/atusb
EESCHEMA=../../../../kicad/eeschema/eeschema
PCBNEW=../../../../kicad/pcbnew/pcbnew
usage()
{
echo "usage: $0 test" 2>&1
echo " $0 clean" 2>&1
echo " $0 help" 2>&1
echo 2>&1
exit 1
}
if [ "$1" == "getsrc" ]; then
git clone git://projects.qi-hardware.com/ben-wpan.git
git clone git://projects.qi-hardware.com/kicad-libs.git
exit
fi
if [ "$1" == "test" ]; then
cd ben-wpan/atusb
echo Displaying eeschema help text:
$EESCHEMA --help
echo -----
echo Listing 3 sheets:
$EESCHEMA --list-sheets atusb.sch
echo -----
echo Plotting PostScript:
$EESCHEMA --plot=ps atusb.sch
ps2pdf atusb.ps atusb_noopt.pdf
ps2pdf atusb-RF.ps atusb-RF_noopt.pdf
ps2pdf atusb-USB.ps atusb-USB_noopt.pdf
$EESCHEMA --plot=ps --plot-bw atusb.sch
ps2pdf atusb.ps atusb_bw.pdf
ps2pdf atusb-RF.ps atusb-RF_bw.pdf
ps2pdf atusb-USB.ps atusb-USB_bw.pdf
$EESCHEMA --plot=ps --plot-sheetref atusb.sch
ps2pdf atusb.ps atusb_sheetref.pdf
ps2pdf atusb-RF.ps atusb-RF_sheetref.pdf
ps2pdf atusb-USB.ps atusb-USB_sheetref.pdf
ls -la *.pdf
echo -----
echo Plotting SVG:
$EESCHEMA --plot=svg atusb.sch
$EESCHEMA --plot=svg --plot-bw atusb.sch
$EESCHEMA --plot=svg --plot-sheetref atusb.sch
ls -la *.svg
echo -----
echo Plotting DXF:
$EESCHEMA --plot=dxf atusb.sch
$EESCHEMA --plot=dxf --plot-bw atusb.sch
$EESCHEMA --plot=dxf --plot-sheetref atusb.sch
ls -la *.dxf
echo -----
echo Generating BOM:
$EESCHEMA --bom atusb.sch
ls -la *.lst
echo -----
echo Running ERC:
$EESCHEMA --erc atusb.sch
ls -la *.erc
echo -----
echo Generating netlist:
$EESCHEMA --netlist atusb.sch
ls -la *.net
echo -----
echo Displaying pcbnew help text:
$PCBNEW --help
echo -----
echo Generating .drl drill files:
$PCBNEW --drill atusb.brd
ls -la *.drl
echo -----
echo Listing enabled layers:
$PCBNEW --list-layers atusb.brd
echo -----
echo Generating .rpt design rule file:
$PCBNEW --drc atusb.brd
ls -la *.rpt
echo -----
echo Generating .pos front and back position files:
$PCBNEW --pos atusb.brd
ls -la *.pos
echo -----
echo Generating .csv bom:
$PCBNEW --bom atusb.brd
ls -la *.csv
echo -----
echo Generating .cmp components for CvPcb:
$PCBNEW --cmp atusb.brd
ls -la *.cmp
echo -----
echo Generating .wrl vrml board representation:
$PCBNEW --vrml atusb.brd
ls -la *.wrl
echo -----
# We are currently not testing options affecting plotting operation
# such as --layers --mirror --exlude-pcb-edge --fill-all-zones
echo Plotting GERBER:
$PCBNEW --plot=gerber atusb.brd
ls -la *.{gbr,gba,gbs,gbo,gts}
echo -----
echo Plotting HPGL:
$PCBNEW --plot=hpgl atusb.brd
ls -la *.plt
echo -----
echo Plotting Postscript \(A4\):
$PCBNEW --plot=ps_a4 atusb.brd
ls -la *.ps
echo -----
echo Plotting Postscript:
$PCBNEW --plot=ps atusb.brd
ls -la *.ps
echo -----
echo Plotting DXF:
$PCBNEW --plot=dxf atusb.brd
ls -la *.dxf
echo -----
echo Plotting SVG:
$PCBNEW --svg atusb.brd
ls -la *.svg
echo -----
cd ../..
exit
fi
if [ "$1" == "clean" ]; then
cd ben-wpan/atusb
rm atusb_bw.pdf atusb_noopt.pdf atusb_sheetref.pdf \
atusb-RF_bw.pdf atusb-RF_noopt.pdf atusb-RF_sheetref.pdf \
atusb-USB_bw.pdf atusb-USB_noopt.pdf atusb-USB_sheetref.pdf \
atusb.ps atusb-RF.ps atusb-USB.ps \
atusb.svg atusb-RF.svg atusb-USB.svg \
atusb.dxf atusb-RF.dxf atusb-USB.dxf \
atusb.lst \
atusb.erc \
atusb.net \
atusb.drl atusb-NPTH.drl \
atusb_Front.pos \
atusb.rpt \
atusb.cmp \
atusb.csv \
atusb.wrl \
atusb-Back.gbr atusb-Comments.gbr atusb-Drawings.gbr atusb-Front.gba \
atusb-Mask_Back.gts atusb-Mask_Front.gbr atusb-PCB_Edges.gbr \
atusb-SilkS_Front.gbs atusb-SoldP_Front.gbo
rmdir shapes3D
cd ../..
exit
fi
usage