From 265576f6370b1ec5369718b7bfa120a4e19786b2 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Wed, 21 Jul 2021 16:43:49 -0400 Subject: [PATCH] compress static files in parallel --- process-static | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/process-static b/process-static index 1e6505d..ef4d891 100755 --- a/process-static +++ b/process-static @@ -11,6 +11,5 @@ cp --remove-destination webapps/element/config.json static_tmp/config.json cp nginx/nginx.conf nginx.conf.tmp -find static_tmp -regex '.+\.\(css\|html\|ico\|js\|json\|map\|svg\|txt\|webmanifest\|xml\|wasm\)' \ - -exec zopfli {} \; -exec touch -r {} {}.gz \; \ - -exec brotli -k {} \; +find static_tmp -regex '.+\.\(css\|html\|ico\|js\|json\|map\|svg\|txt\|webmanifest\|xml\|wasm\)' | + parallel "brotli -k {}; zopfli {} && touch -r {} {}.gz"