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
BBaoVanC 626f96c196
All checks were successful
continuous-integration/drone/push Build is passing
Make compress.sh POSIX compliant instead
2021-06-12 20:40:09 -05:00

7 lines
243 B
Bash
Executable File

#!/bin/sh
files=$(find public/ -name "*.html" -o -name "*.xml" -o -name "*.css" -o -name "*.js")
printf '%s\n' "$files" | parallel $@ "echo 'GZIP {}' && gzip -fnk {}"
printf '%s\n' "$files" | parallel $@ "echo 'BROTLI {}' && brotli -fZk {}"