Add better logging for when a file is being compressed

This commit is contained in:
Tony Blyler 2021-05-16 11:59:27 -04:00
parent 7279501452
commit b274e34c80
Signed by: tblyler
GPG key ID: 7F13D9A60C0D678E

View file

@ -72,19 +72,19 @@ FILE_SHA256="$(sha256sum < "${FILE_NAME}")"
readonly FILE_SHA256
if ! [ -e "${FILE_NAME}.zst" ] || [ "${FILE_SHA256}" != "$(zstd -d -c "${FILE_NAME}.zst" | sha256sum)" ]; then
echo "$FILE_NAME"
echo "zstd: $FILE_NAME"
rm -f "${FILE_NAME}.zst"
zstd -k -T0 --ultra -20 "${FILE_NAME}" &> /dev/null &
fi
if ! [ -e "${FILE_NAME}.gz" ] || [ "${FILE_SHA256}" != "$(gzip -d -c "${FILE_NAME}.gz" | sha256sum)" ]; then
echo "$FILE_NAME"
echo "gzip: $FILE_NAME"
rm -f "${FILE_NAME}.gz"
pigz -k -9 "${FILE_NAME}" &> /dev/null &
fi
if ! [ -e "${FILE_NAME}.br" ] || [ "${FILE_SHA256}" != "$(brotli -d -c "${FILE_NAME}.br" | sha256sum)" ]; then
echo "$FILE_NAME"
echo "brotli: $FILE_NAME"
rm -f "${FILE_NAME}.br"
brotli -k -9 "${FILE_NAME}" &> /dev/null &
fi