aboutsummaryrefslogtreecommitdiff
path: root/gerboweb/deploy/render.sh
diff options
context:
space:
mode:
authorjaseg <code@jaseg.net>2019-04-02 04:36:10 +0900
committerjaseg <git@jaseg.net>2019-04-02 04:36:10 +0900
commitcbb98bcf0ee0e9e123f054377ff68b513efe6bf6 (patch)
treed44deea64134600a6b385c3c4a773aadc20812cf /gerboweb/deploy/render.sh
parenta846d39bc88e0c03402b20790b04762666bc055f (diff)
downloadgerbolyze-cbb98bcf0ee0e9e123f054377ff68b513efe6bf6.tar.gz
gerbolyze-cbb98bcf0ee0e9e123f054377ff68b513efe6bf6.tar.bz2
gerbolyze-cbb98bcf0ee0e9e123f054377ff68b513efe6bf6.zip
gerboweb: Modularize deployment playbooks a bit
Diffstat (limited to 'gerboweb/deploy/render.sh')
-rwxr-xr-xgerboweb/deploy/render.sh20
1 files changed, 0 insertions, 20 deletions
diff --git a/gerboweb/deploy/render.sh b/gerboweb/deploy/render.sh
deleted file mode 100755
index eefe7f0..0000000
--- a/gerboweb/deploy/render.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-[ $# != 1 ] && exit 1
-ID=$1
-egrep -x -q '^[-0-9A-Za-z]{36}$'<<<"$ID" || exit 2
-
-systemd-nspawn \
- -D /var/cache/gerbolyze_container \
- -x --bind=/var/cache/gerboweb/upload/$ID:/mnt \
- /bin/sh -c "set -euo pipefail
-unzip -j -d /tmp/gerber /mnt/gerber.zip
-rm -f /mnt/render_top.png /mnt/render_bottom.png /mnt/render_top.small.png /mnt/render_bottom.small.png
-date; echo 'Rendering bottom layer'
-gerbolyze render top /tmp/gerber /mnt/render_top.png
-date; echo 'Scaling down'
-convert /mnt/render_top.png -resize 500x500 -negate -brightness-contrast 30x30 -colorspace gray /mnt/render_top.small.png
-date; echo 'Rendering top layer'
-gerbolyze render bottom /tmp/gerber /mnt/render_bottom.png
-date; echo 'Scaling down'
-convert /mnt/render_bottom.png -resize 500x500 -negate -brightness-contrast 30x30 -colorspace gray /mnt/render_bottom.small.png"