Created
March 14, 2014 08:21
-
-
Save youngshook/9543954 to your computer and use it in GitHub Desktop.
List unused images in an Xcode Project
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/sh | |
# Find PNG images not referenced by any xib, m/h, and plist files | |
# Works from current directory downward. | |
refs=`find . -name '*.xib' -o -name '*.[mh]' -o -name '*.plist'` | |
for image in `find . -name '*.png'` | |
do | |
image_basename=`basename $image` | |
image_name=${image_basename%.*} | |
if ! grep -q $image_name $refs; then | |
echo $image | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment