mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-23 03:20:36 +02:00
153 lines
4.0 KiB
Bash
Executable File
153 lines
4.0 KiB
Bash
Executable File
#!/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 Listing enabled layers:
|
|
$PCBNEW --list-layers atusb.brd
|
|
echo -----
|
|
echo Generating .drl drill files:
|
|
$PCBNEW --drill atusb.brd
|
|
ls -la *.drl
|
|
echo -----
|
|
# We are currently not testing options affecting plotting operation
|
|
# such as --layers --plot-mirror and others.
|
|
echo Plotting GERBER:
|
|
$PCBNEW --plot=gerber atusb.brd
|
|
ls -la *.{gbr,gba,gbs,gbo,gts}
|
|
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=selected atusb.brd
|
|
ls -la *.svg
|
|
echo -----
|
|
echo Generating .rpt design rule file:
|
|
$PCBNEW --drc atusb.brd
|
|
ls -la *.rpt
|
|
echo -----
|
|
echo Generating .pos position file:
|
|
$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 -----
|
|
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_all.pos \
|
|
atusb.rpt \
|
|
atusb.cmp \
|
|
atusb.csv \
|
|
atusb.wrl \
|
|
atusb-Front.{gba,ps,dxf,svg} \
|
|
atusb-Back.{gbr,ps,dxf,svg} \
|
|
atusb-Comments.{gbr,ps,dxf} \
|
|
atusb-Drawings.{gbr,ps,dxf} \
|
|
atusb-Mask_Front.{gbr,ps,dxf} \
|
|
atusb-Mask_Back.{gts,ps,dxf} \
|
|
atusb-PCB_Edges.{gbr,ps,dxf} \
|
|
atusb-SilkS_Front.{gbs,ps,dxf,svg} \
|
|
atusb-SoldP_Front.{gbo,ps,dxf}
|
|
rmdir shapes3D
|
|
cd ../..
|
|
exit
|
|
fi
|