Run admesh form export.sh, die on error
This commit is contained in:
parent
0b2bd9532e
commit
f592fe44d4
1 changed files with 5 additions and 5 deletions
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash -x
|
||||
#!/bin/bash -xe
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "Usage: ./export.sh \$BADGE \$SIZE"
|
||||
|
|
@ -10,16 +10,16 @@ size=$2
|
|||
|
||||
|
||||
# cleanup from our last run
|
||||
rm -f badge.png badge-shape.png badge.dat badge-shape.dat
|
||||
rm -f badge.png badge-shape.png badge.dat badge-shape.dat badge.stl
|
||||
|
||||
# Kick it off
|
||||
inkscape --export-png=badge.png --export-width=$size --export-height=$size ../svgs/$badge.svg
|
||||
inkscape --export-png=badge-shape.png --export-width=$size --export-height=$size ../svgs/badge-shape.svg
|
||||
python png2heightmap.py badge.png > badge.dat
|
||||
python png2heightmap.py badge-shape.png > badge-shape.dat
|
||||
openscad badge.scad -o ../stls/$badge.stl
|
||||
admesh --write-binary-stl=../stls/badge.stl ../stls/badge.stl
|
||||
openscad badge.scad -o badge.stl
|
||||
admesh --translate=0,0,0 --write-binary-stl=../stls/$badge.stl badge.stl
|
||||
echo "Done with ../stls/$badge.stl"
|
||||
|
||||
# and.. cleanup.
|
||||
rm -f badge.png badge-shape.png badge.dat badge-shape.dat
|
||||
rm -f badge.png badge-shape.png badge.dat badge-shape.dat badge.stl
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue