Fix cwebp command

This commit is contained in:
VirtuBox 2019-07-12 14:11:01 +02:00
parent 94b9c21492
commit 20154dd39c
No known key found for this signature in database
GPG Key ID: 22EB296C97BAD476

View File

@ -195,7 +195,7 @@ if [ "$WEBP_OPTIMIZATION" = "y" ]; then
bash -c '[ ! -f "{}.webp" ] && { cwebp -quiet -z 9 -mt "{}" -o "{}.webp"; }' bash -c '[ ! -f "{}.webp" ] && { cwebp -quiet -z 9 -mt "{}" -o "{}.webp"; }'
else else
find . -type f -iname "*.png" -print0 | xargs -r -0 -I {} \ find . -type f -iname "*.png" -print0 | xargs -r -0 -I {} \
bash -c '[ ! -f "{}.webp" ] && { cwebp -z 9 -mt "{}" -o "{}.webp"; }' bash -c '[ ! -f "{}.webp" ] && { cwebp -z 9 -short -mt "{}" -o "{}.webp"; }'
fi fi
echo -ne " png to webp conversion [${CGREEN}OK${CEND}]\\r" echo -ne " png to webp conversion [${CGREEN}OK${CEND}]\\r"
@ -209,7 +209,7 @@ if [ "$WEBP_OPTIMIZATION" = "y" ]; then
bash -c '[ ! -f "{}.webp" ] && { cwebp -quiet -q 82 -mt "{}" -o "{}.webp"; }' bash -c '[ ! -f "{}.webp" ] && { cwebp -quiet -q 82 -mt "{}" -o "{}.webp"; }'
else else
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -print0 | xargs -0 -I {} \ find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -print0 | xargs -0 -I {} \
bash -c '[ ! -f "{}.webp" ] && { cwebp -q 82 -mt "{}" -o "{}.webp"; }' bash -c '[ ! -f "{}.webp" ] && { cwebp -q 82 -short -mt "{}" -o "{}.webp"; }'
fi fi
echo -ne " jpg to webp conversion [${CGREEN}OK${CEND}]\\r" echo -ne " jpg to webp conversion [${CGREEN}OK${CEND}]\\r"