Make compress.sh POSIX compliant instead
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
BBaoVanC 2021-06-12 20:40:09 -05:00
parent 19793068b3
commit 626f96c196
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A

View File

@ -1,19 +1,6 @@
#!/bin/bash
#!/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
printf '%s\n' "$files" | parallel $@ "echo 'GZIP {}' && gzip -fnk {}"
printf '%s\n' "$files" | parallel $@ "echo 'BROTLI {}' && brotli -fZk {}"