summaryrefslogtreecommitdiff
path: root/publish
diff options
context:
space:
mode:
Diffstat (limited to 'publish')
-rwxr-xr-xpublish16
1 files changed, 11 insertions, 5 deletions
diff --git a/publish b/publish
index 38c005e..5dc7424 100755
--- a/publish
+++ b/publish
@@ -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 .;
)
##