2023-03-16 17:45:05 +10:00
|
|
|
#!/bin/sh
|
|
|
|
|
2023-03-18 21:51:37 +10:00
|
|
|
set -ex
|
2023-03-16 17:45:05 +10:00
|
|
|
|
2023-03-18 17:27:10 +10:00
|
|
|
CSS="simple style"
|
|
|
|
JS="live"
|
2023-03-16 17:45:05 +10:00
|
|
|
|
2023-03-18 17:27:10 +10:00
|
|
|
for css in $CSS; do
|
2023-03-18 21:51:37 +10:00
|
|
|
if [ -f "$ZS_OUTDIR/css/$css.css" ]; then
|
|
|
|
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
|
2023-03-18 17:27:10 +10:00
|
|
|
done
|
2023-03-16 17:45:05 +10:00
|
|
|
|
2023-03-18 17:27:10 +10:00
|
|
|
for js in $JS; do
|
2023-03-18 21:51:37 +10:00
|
|
|
if [ -f "$ZS_OUTDIR/js/$js.js" ]; then
|
|
|
|
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
|
2023-03-18 17:27:10 +10:00
|
|
|
done
|