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