Last active
September 23, 2016 12:15
-
-
Save binho/51fe8a9b5bef493f94fb352096a12d86 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIRECTORY=$1 | |
echo "------------------------------" | |
echo "Passed Resources with xcassets folder argument is <$DIRECTORY>" | |
echo "------------------------------" | |
XC_ASSETS="$(find "$DIRECTORY" -name '*.xcassets')" | |
for xcasset in $XC_ASSETS; do | |
echo "-- 📦 XC Asset: $xcasset" | |
IMAGE_SETS="$(find "$xcasset" -name '*.imageset')" | |
for imageset in $IMAGE_SETS; do | |
echo "---- 🌠 Image set: $imageset" | |
FILES="$(find "$imageset" -name '*.png')" | |
for file in $FILES; do | |
echo "-------- ✅ PNG FILE: $file" | |
sips -m "/System/Library/Colorsync/Profiles/sRGB Profile.icc" $file --out $file | |
done | |
done | |
done | |
echo "------------------------------" | |
echo "🎉 Done" | |
echo "------------------------------" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./fix-image-color-ios8.sh /path/to/project |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment