Created
August 11, 2017 00:03
-
-
Save mgiuffrida/b2b33b3e786d4bb94c1de85c57cac999 to your computer and use it in GitHub Desktop.
Find unused Ash vector icons in Chromium
This file contains hidden or 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
#!/usr/bin/env sh | |
icons=(ash/resources/vector_icons/*.icon) | |
icons_stripped=() | |
for icon in ${icons[@]}; do | |
icon=$(basename "$icon") | |
icon=${icon/.1x/} | |
icon=${icon/.icon/} | |
icons_stripped+=($icon) | |
done | |
IFS=$'\n' icons_stripped=($(sort -u <<<"${icons_stripped[*]}")) | |
icon_constants=() | |
for icon in ${icons_stripped[@]}; do | |
icon_constants+=("k${icon//_/}icon") | |
done | |
for icon in ${icon_constants[@]}; do | |
if ! git grep -q -i "$icon" origin/master -- chrome ui ash; then | |
echo $icon | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment