mirror of
https://git.boba.best/boba.best/boba.best.git
synced 2024-12-21 11:33:19 -06:00
Make compress.sh POSIX compliant instead
This commit is contained in:
parent
19793068b3
commit
626f96c196
19
compress.sh
19
compress.sh
@ -1,19 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
files=$(find public/ -name "*.html" -o -name "*.xml" -o -name "*.css" -o -name "*.js")
|
files=$(find public/ -name "*.html" -o -name "*.xml" -o -name "*.css" -o -name "*.js")
|
||||||
|
|
||||||
gz() {
|
printf '%s\n' "$files" | parallel $@ "echo 'GZIP {}' && gzip -fnk {}"
|
||||||
echo "GZIP $1"
|
printf '%s\n' "$files" | parallel $@ "echo 'BROTLI {}' && brotli -fZk {}"
|
||||||
gzip -fnk $1
|
|
||||||
}
|
|
||||||
|
|
||||||
br() {
|
|
||||||
echo "BROTLI $1"
|
|
||||||
brotli -fZk $1
|
|
||||||
}
|
|
||||||
|
|
||||||
export -f gz
|
|
||||||
export -f br
|
|
||||||
|
|
||||||
parallel $@ gz {} <<< $files
|
|
||||||
parallel $@ br {} <<< $files
|
|
||||||
|
Loading…
Reference in New Issue
Block a user