Configurable compress cmd
This commit is contained in:
parent
9023eb4aec
commit
461c51807f
|
@ -1,2 +1,3 @@
|
||||||
REPO_URL=""
|
REPO_URL=""
|
||||||
REBUILD_INTERVAL=1d
|
REBUILD_INTERVAL=1d
|
||||||
|
COMPRESS_CMD="zopfli"
|
|
@ -23,10 +23,12 @@ git submodule update
|
||||||
|
|
||||||
zola build
|
zola build
|
||||||
|
|
||||||
|
if [ "$COMPRESS_CMD" != "" ]; then
|
||||||
echo "Compressing files..."
|
echo "Compressing files..."
|
||||||
find public -type f -name '*.css' -size +5k -exec zopfli '{}' \;
|
find public -type f -name '*.css' -size +5k -exec $COMPRESS_CMD '{}' \;
|
||||||
find public -type f -name '*.js' -size +5k -exec zopfli '{}' \;
|
find public -type f -name '*.js' -size +5k -exec $COMPRESS_CMD '{}' \;
|
||||||
find public -type f -name '*.html' -size +5k -exec zopfli '{}' \;
|
find public -type f -name '*.html' -size +5k -exec $COMPRESS_CMD '{}' \;
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Updating webpage..."
|
echo "Updating webpage..."
|
||||||
mkdir -p "$WEB_PATH"
|
mkdir -p "$WEB_PATH"
|
||||||
|
|
Loading…
Reference in New Issue