Created
November 26, 2019 07:31
-
-
Save mattak/d76059f0ea4f6cff5b68fabba2a7309d to your computer and use it in GitHub Desktop.
listup unity resources which is not used
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 $(git ls-files | grep '.meta' | grep -v "Assets/Modules/" | egrep '(png|prefab|controller|anim|asset|playable|mp3).meta$') | |
do | |
unity_guid=$(cat "$f" | grep 'guid:' | awk '{print $2}') | |
matches=$(ag -l $unity_guid | wc -l | awk '{print $1}') | |
if [ $matches -eq 1 ]; then | |
echo $f | sed 's|.meta$||g' | |
fi | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
it requires silver searcher