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