Created
June 2, 2014 13:04
-
-
Save unnikked/0aa8437f75e01a5a4579 to your computer and use it in GitHub Desktop.
A simple bash script to install fonts on your Ubuntu like distro
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 | |
| if [ $# -ne 1 ]; then | |
| echo "USAGE: $0 [font-file]" | |
| exit 1 | |
| fi | |
| if [ "$(whoami)" != "root" ]; then | |
| echo "You do not have enough privileges to use this script" | |
| exit 1 | |
| fi | |
| echo "Copying $1 to system font location.." | |
| cp -i "$1" /usr/share/fonts/truetype/ | |
| echo "Reloading fonts.." | |
| fc-cache -f | |
| exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment