Last active
October 21, 2015 19:07
-
-
Save dictions/f86cdd288e756fc19b39 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# Ask for the administrator password upfront | |
sudo -v | |
# Keep-alive: update existing `sudo` time stamp until `sync` has finished | |
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & | |
# Reset font directories | |
sudo fontrestore default | |
# Throw extra fonts in trash | |
sudo rm -rf /Library/Fonts\ \(Removed\) | |
sudo rm -rf ~/Library/Fonts\ \(Removed\) | |
sudo rm -rf /System/Library/Fonts\ \(Removed\) | |
# Copy over the repo fonts | |
rsync -a -p fonts/repo*/*/. ~/Library/Fonts/. | |
# Copy over any user fonts | |
rsync -a -p fonts/user*/*/. ~/Library/Fonts/. | |
echo 'All done bro.' | |
# We probably need some error handling |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment