Fix posthook

This commit is contained in:
James Mills 2023-03-18 21:51:37 +10:00
parent cb755d0d7b
commit 74008910f8
No known key found for this signature in database
GPG Key ID: AC4C014F1440EBD6
2 changed files with 14 additions and 6 deletions

View File

@ -1,16 +1,24 @@
#!/bin/sh #!/bin/sh
set -e set -ex
CSS="simple style" CSS="simple style"
JS="live" JS="live"
for css in $CSS; do for css in $CSS; do
[ -f "$ZS_OUTDIR/css/$css.css" ] && minify -o "$ZS_OUTDIR/css/$css.min.css" "$ZS_OUTDIR/css/$css.css" if [ -f "$ZS_OUTDIR/css/$css.css" ]; then
[ -f "$ZS_OUTDIR/css/$css.css" ]&& rm "$ZS_OUTDIR/css/$css.css" minify -o "$ZS_OUTDIR/css/$css.min.css" "$ZS_OUTDIR/css/$css.css"
fi
if [ -f "$ZS_OUTDIR/css/$css.css" ]; then
rm "$ZS_OUTDIR/css/$css.css"
fi
done done
for js in $JS; do for js in $JS; do
[ -f "$ZS_OUTDIR/js/$js.js" ] && minify -o "$ZS_OUTDIR/js/$js.min.js" "$ZS_OUTDIR/js/$js.js" if [ -f "$ZS_OUTDIR/js/$js.js" ]; then
[ -f "$ZS_OUTDIR/js/$js.js" ] && rm "$ZS_OUTDIR/js/$js.js" minify -o "$ZS_OUTDIR/js/$js.min.js" "$ZS_OUTDIR/js/$js.js"
fi
if [ -f "$ZS_OUTDIR/js/$js.js" ]; then
rm "$ZS_OUTDIR/js/$js.js"
fi
done done