diff options
author | jaseg <git@jaseg.net> | 2020-12-30 13:12:06 +0100 |
---|---|---|
committer | jaseg <git@jaseg.net> | 2020-12-30 13:12:06 +0100 |
commit | c6b1c2225d1ac4ac647950be8667b5709b0033a1 (patch) | |
tree | 8db7a14649a277d236791e1c731d98af03a0af88 /gerboweb/deploy/render.sh.j2 | |
parent | e290ac758b02a9d03bacd511c87fc997db41d0a8 (diff) | |
download | gerbolyze-master.tar.gz gerbolyze-master.tar.bz2 gerbolyze-master.zip |
Diffstat (limited to 'gerboweb/deploy/render.sh.j2')
-rwxr-xr-x | gerboweb/deploy/render.sh.j2 | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/gerboweb/deploy/render.sh.j2 b/gerboweb/deploy/render.sh.j2 deleted file mode 100755 index ceb837d..0000000 --- a/gerboweb/deploy/render.sh.j2 +++ /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 {{gerboweb_root}} \ - -x --bind={{gerboweb_cache}}/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" |