diff options
author | Zach van Rijn <me@zv.io> | 2021-08-26 13:41:33 -0500 |
---|---|---|
committer | Zach van Rijn <me@zv.io> | 2021-08-26 13:41:33 -0500 |
commit | fd034728471b70b0f610877211c501007156456d (patch) | |
tree | 1bbd885ffb93d8e26cf3d0b7b2faacc0c3aba0bd | |
parent | 84c99d787dfc715c0daa38cfdad17dd654436caf (diff) | |
download | site-ng-fd034728471b70b0f610877211c501007156456d.tar.gz site-ng-fd034728471b70b0f610877211c501007156456d.tar.bz2 site-ng-fd034728471b70b0f610877211c501007156456d.tar.xz site-ng-fd034728471b70b0f610877211c501007156456d.zip |
Containerize all image conversions. Remove generation of tarball.
-rwxr-xr-x | publish | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -3,7 +3,6 @@ HERE=$(dirname $(readlink -f ${0}))/src; HTML=html; -rm -f ${HTML}.tgz; TEMP=$(mktemp -d); chmod 755 ${TEMP}; @@ -17,17 +16,19 @@ chmod 755 ${TEMP}; # (cd assets/images && ./polyguin.sh) +#=============================================================== +docker run -v ${HERE}:${HERE} -e HERE=${HERE} -v ${TEMP}:${TEMP} -e TEMP=${TEMP} --rm -i alpine:3.14 <<'EOF' +apk add findutils imagemagick; +#=============================================================== + ## # .psd --> .jpg ONLY in 'src/' # -docker run -v$(pwd):/x -w/x --rm -i alpine:3.14 <<'EOF' -apk add imagemagick; find ${HERE} -type f -name "*.psd" | while read k; do f="${k#*${HERE}}"; mkdir -p "${TEMP}${f%/*}"; convert "${k}[0]" -strip "${TEMP}${f%*.psd}.jpg"; done -EOF ## # template injection @@ -47,6 +48,12 @@ find ${HERE} -type f -name "*.html" | while read k; do ; done +chown -R 1000:1000 ${TEMP}; + +#=============================================================== +EOF +#=============================================================== + ## # static assets # @@ -62,7 +69,6 @@ cp ${HERE}/robots.txt ${TEMP}; # ( cd ${TEMP}; - tar -pczf ../${HTML}.tgz .; ) ## |