Fix bash -c
This commit is contained in:
parent
0fa994d9ec
commit
673889e740
9
.editorconfig
Normal file
9
.editorconfig
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = false
|
|
@ -193,10 +193,10 @@ if [ "$WEBP_OPTIMIZATION" = "y" ]; then
|
||||||
cd "$IMG_PATH" || exit 1
|
cd "$IMG_PATH" || exit 1
|
||||||
if [ -n "$FIND_ARGS" ]; then
|
if [ -n "$FIND_ARGS" ]; then
|
||||||
find . -type f -iname "*.png" -cmin "$FIND_ARGS" -print0 | xargs -0 -r -I {} \
|
find . -type f -iname "*.png" -cmin "$FIND_ARGS" -print0 | xargs -0 -r -I {} \
|
||||||
bash -c '[ ! -f "{}.webp" ] && { cwebp -z 9 -mt -quiet "{}" -o "{}.webp"; }'
|
bash -c "[ ! -f '{}.webp' ] && { cwebp -z 9 -mt $WEBP_ARGS '{}' -o '{}.webp'; }"
|
||||||
else
|
else
|
||||||
find . -type f -iname "*.png" -print0 | xargs -0 -r -I {} \
|
find . -type f -iname "*.png" -print0 | xargs -0 -r -I {} \
|
||||||
bash -c '[ ! -f "{}.webp" ] && { cwebp -z 9 -mt -quiet "{}" -o "{}.webp"; }'
|
bash -c "[ ! -f '{}.webp' ] && { cwebp -z 9 -mt $WEBP_ARGS '{}' -o '{}.webp'; }"
|
||||||
fi
|
fi
|
||||||
echo -ne " png to webp conversion [${CGREEN}OK${CEND}]\\r"
|
echo -ne " png to webp conversion [${CGREEN}OK${CEND}]\\r"
|
||||||
echo -ne '\n'
|
echo -ne '\n'
|
||||||
|
@ -206,10 +206,10 @@ if [ "$WEBP_OPTIMIZATION" = "y" ]; then
|
||||||
cd "$IMG_PATH" || exit 1
|
cd "$IMG_PATH" || exit 1
|
||||||
if [ -n "$FIND_ARGS" ]; then
|
if [ -n "$FIND_ARGS" ]; then
|
||||||
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -cmin "$FIND_ARGS" -print0 | xargs -0 -r -I {} \
|
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -cmin "$FIND_ARGS" -print0 | xargs -0 -r -I {} \
|
||||||
bash -c '[ ! -f "{}.webp" ] && { cwebp -quiet -q 82 -mt "{}" -o "{}.webp"; }'
|
bash -c "[ ! -f '{}.webp' ] && { cwebp $WEBP_ARGS -q 82 -mt '{}' -o '{}.webp'; }"
|
||||||
else
|
else
|
||||||
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -print0 | xargs -0 -r -I {} \
|
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -print0 | xargs -0 -r -I {} \
|
||||||
bash -c '[ ! -f "{}.webp" ] && { cwebp -quiet -q 82 -mt "{}" -o "{}.webp"; }'
|
bash -c "[ ! -f '{}.webp' ] && { cwebp $WEBP_ARGS -q 82 -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"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user