Detect and clean up unneeded duplicates (#7619)

This commit is contained in:
Franck Nijhof 2025-08-07 14:19:52 +02:00 committed by GitHub
parent ff48871124
commit c6b24fcbd4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
82 changed files with 63 additions and 0 deletions

View file

@ -142,6 +142,69 @@ while read image; do
((IMAGES++))
done <<< $(find core_integrations custom_integrations core_brands -type f)
# Check for identical icon and logo images (using file hashes)
for folder in core_integrations/* custom_integrations/* core_brands/*; do
[[ ! -d "${folder}" ]] && continue
# Check if icon and logo files are byte-for-byte identical
# Standard resolution
if [[ -f "${folder}/icon.png" ]] && [[ -f "${folder}/logo.png" ]]; then
if cmp -s "${folder}/icon.png" "${folder}/logo.png"; then
error "${folder}/logo.png" "logo.png is identical to icon.png. Please remove logo.png as the icon will be used automatically"
fi
fi
# High resolution @2x
if [[ -f "${folder}/icon@2x.png" ]] && [[ -f "${folder}/logo@2x.png" ]]; then
if cmp -s "${folder}/icon@2x.png" "${folder}/logo@2x.png"; then
error "${folder}/logo@2x.png" "logo@2x.png is identical to icon@2x.png. Please remove logo@2x.png as the icon will be used automatically"
fi
fi
# Dark mode standard resolution
if [[ -f "${folder}/dark_icon.png" ]] && [[ -f "${folder}/dark_logo.png" ]]; then
if cmp -s "${folder}/dark_icon.png" "${folder}/dark_logo.png"; then
error "${folder}/dark_logo.png" "dark_logo.png is identical to dark_icon.png. Please remove dark_logo.png as the icon will be used automatically"
fi
fi
# Dark mode high resolution @2x
if [[ -f "${folder}/dark_icon@2x.png" ]] && [[ -f "${folder}/dark_logo@2x.png" ]]; then
if cmp -s "${folder}/dark_icon@2x.png" "${folder}/dark_logo@2x.png"; then
error "${folder}/dark_logo@2x.png" "dark_logo@2x.png is identical to dark_icon@2x.png. Please remove dark_logo@2x.png as the icon will be used automatically"
fi
fi
# Check if dark variants are identical to light variants
# Dark icon vs light icon - standard resolution
if [[ -f "${folder}/icon.png" ]] && [[ -f "${folder}/dark_icon.png" ]]; then
if cmp -s "${folder}/icon.png" "${folder}/dark_icon.png"; then
error "${folder}/dark_icon.png" "dark_icon.png is identical to icon.png. Please remove dark_icon.png and dark_icon@2x.png as the light version will be used automatically"
fi
fi
# Dark icon vs light icon - high resolution
if [[ -f "${folder}/icon@2x.png" ]] && [[ -f "${folder}/dark_icon@2x.png" ]]; then
if cmp -s "${folder}/icon@2x.png" "${folder}/dark_icon@2x.png"; then
error "${folder}/dark_icon@2x.png" "dark_icon@2x.png is identical to icon@2x.png. Please remove dark_icon.png and dark_icon@2x.png as the light version will be used automatically"
fi
fi
# Dark logo vs light logo - standard resolution
if [[ -f "${folder}/logo.png" ]] && [[ -f "${folder}/dark_logo.png" ]]; then
if cmp -s "${folder}/logo.png" "${folder}/dark_logo.png"; then
error "${folder}/dark_logo.png" "dark_logo.png is identical to logo.png. Please remove dark_logo.png and dark_logo@2x.png as the light version will be used automatically"
fi
fi
# Dark logo vs light logo - high resolution
if [[ -f "${folder}/logo@2x.png" ]] && [[ -f "${folder}/dark_logo@2x.png" ]]; then
if cmp -s "${folder}/logo@2x.png" "${folder}/dark_logo@2x.png"; then
error "${folder}/dark_logo@2x.png" "dark_logo@2x.png is identical to logo@2x.png. Please remove dark_logo.png and dark_logo@2x.png as the light version will be used automatically"
fi
fi
done
echo ""
echo "Total of ${IMAGES} images checked, found ${ERRORS} issues."

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 286 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB