This commit is contained in:
2019-10-06 18:14:34 -07:00
parent fcd88b5a32
commit e9a22c7d0c
2 changed files with 4 additions and 3 deletions

View File

@@ -3,18 +3,18 @@
set -e
set +x
for FILE in img/bench/webp-src/*.jpg; do
for FILE in img/bench/webp-src/*.{png,jpg}; do
FULLNAME=$(basename -- ${FILE})
NAME=${FULLNAME%.*}
OUT="img/bench/${NAME}.webp"
OUT2X="img/bench/${NAME}@2x.webp"
echo "Checking for \"${OUT}\"..."
if [ ! -f "${OUT}" ]; then
echo "Would thumbnail ${OUT}"
echo "Making thumbnail ${OUT}"
cwebp -mt -resize 160 0 -q 40 ${FILE} -o ${OUT}
fi
if [ ! -f "${OUT2X}" ]; then
echo "Would thumbnail@2x ${OUT2X}"
echo "Making thumbnail@2x ${OUT2X}"
cwebp -mt -q 40 ${FILE} -o ${OUT2X}
fi
done