Created
November 9, 2014 20:38
-
-
Save itsthatguy/ac5acb88dd97383d700f to your computer and use it in GitHub Desktop.
easily clear mac font cache
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 bash | |
| # Script to clear font cache | |
| color() { | |
| echo -e "\e[$1;38;5;$2m" | |
| } | |
| no_color() { | |
| echo -e "\e[0m" | |
| } | |
| report() { | |
| $* | | |
| while IFS= read line | |
| do | |
| echo -e "$(color 0 7) > $line$no_color" | |
| done | |
| } | |
| echo -e "$(color 0 1)Clearing font cache..." | |
| report sudo atsutil databases -remove | |
| echo -e "\n$(color 0 1)Restarting the ATS (Apple Type Solution) Server..." | |
| report atsutil server -shutdown && report atsutil server -ping |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment