cameo/templates/mkmk-simple: accept no only Gerber but also $NAME.gp as input

This commit is contained in:
Werner Almesberger 2015-01-28 13:59:59 -03:00
parent dc79b03b1d
commit 1f04d6490a
1 changed files with 6 additions and 3 deletions

View File

@ -42,7 +42,8 @@ if [ "$ROT" ]; then
rot="rotate $ROT"
fi
edges=
edges=$NAME.gp
[ -r "$edges" ] || edges=
for n in PCB_Edges.gbr Edge_Cuts.gbr Edge_Cuts.pho; do
if [ -r "../$NAME-$n" ]; then
edges=../$NAME-$n
@ -63,7 +64,8 @@ while [ $yi -lt $YN ]; do
cameo <<EOF || exit
mm
gerber 35mil $edges
`if [ "$edges" != "${edges%.gp}" ]; then echo gnuplot 35mil $edges;
else echo gerber 35mil $edges; fi`
$rot
align 1 $X0 $Y0 # align relative to board corner
translate 4mm 4mm # move to PCB zone assigned to project
@ -87,7 +89,8 @@ $write mill.gp
remainder
empty
gerber $MILL_OUT $edges
`if [ "$edges" != "${edges%.gp}" ]; then echo gnuplot $MILL_OUT $edges;
else echo gerber $MILL_OUT $edges; fi`
offset
append mill.gp
EOF