simplify logic

This commit is contained in:
boubou19 2025-07-24 11:55:08 +02:00
parent ff781d6503
commit 1249f8b168

View File

@ -24,13 +24,8 @@ jobs:
while IFS= read -r -d '' file; do while IFS= read -r -d '' file; do
echo "Compressing: $file" echo "Compressing: $file"
if ! optipng -o7 -nc "$file" >/dev/null 2>&1; then if ! optipng -o7 -nc "$file" >/dev/null 2>&1; then
STATUS=$? echo "FAILED: $file (exit code $STATUS)"
if [[ $STATUS -gt 2 ]]; then FAILED_FILES+="$file"$'\n'
echo "FAILED: $file (exit code $STATUS)"
FAILED_FILES+="$file"$'\n'
else
echo "Skipped (already optimized or warning): $file"
fi
fi fi
done < <(find . -type f -name "*.png" ! -path "./.git/*" -print0) done < <(find . -type f -name "*.png" ! -path "./.git/*" -print0)