This repository has been archived on 2022-05-24. You can view files and clone it, but cannot push or open issues or pull requests.
boba.best/compress.sh

20 lines
280 B
Bash
Executable File

#!/bin/sh
files=$(find public/ -name "*.html" -o -name "*.xml" -o -name "*.css" -o -name "*.js")
gz() {
echo "GZIP $1"
gzip -fnk $1
}
br() {
echo "BROTLI $1"
brotli -fZk $1
}
export -f gz
export -f br
parallel $@ gz {} <<< $files
parallel $@ br {} <<< $files