From 01cd14dca113858656ba4f53e7445593add3370c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Sat, 9 Sep 2023 11:30:14 +0100 Subject: [PATCH] fix crushpng --- lib/crushpng.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/crushpng.sh b/lib/crushpng.sh index 436f38f..302ebf1 100755 --- a/lib/crushpng.sh +++ b/lib/crushpng.sh @@ -2,7 +2,10 @@ set -ex -[ "$(wc -c $1 | awk '{print $1}')" -le $3 ] && (cp $1 $2; exit 0) +if [ "$(wc -c $1 | awk '{print $1}')" -le $3 ]; then + cp $1 $2 + exit 0 +fi for i in $(seq 100 -1 0); do cat $1 | pngquant --quality 0-$i - > $2