Created
December 6, 2011 23:47
-
-
Save dstnbrkr/1440655 to your computer and use it in GitHub Desktop.
Remove unused resources from 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 | |
for f in `find Resources/Images -type f ! -name '*@2x.png' ! -name 'Default*.png'`; do | |
FILENAME=`basename $f`; | |
NUSAGES=`usages $FILENAME | wc -l | awk '{print $1}'`; | |
if [ $NUSAGES = 0 ]; then | |
echo $f; | |
fi; | |
done; |
Thank you so much for this! you really helped the http://joynme.com app out!
Thanks! So glad this could be helpful!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
'usages' is another helper script, from this file: https://gist.github.com/1440673
That script isn't polished or set up for reuse (has my project name hardcoded), but the intent is to search the project directories for references to a filename, then list out the files that reference it (i.e. a class file with a reference to a particular image).