Created
June 4, 2014 12:53
-
-
Save roberto-filho/2aa0fe97eadce492b778 to your computer and use it in GitHub Desktop.
Adds microsoft fonts to your ubuntu
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 | |
| # Install Microsoft Fonts (Including Tahoma) | |
| if [ "$(id -u)" == "0" ] | |
| then | |
| if apt-get install msttcorefonts; then | |
| mkdir temp-tahomafont | |
| cd temp-tahomafont | |
| if wget http://download.microsoft.com/download/ie6sp1/finrel/6_sp1/W98NT42KMeXP/EN-US/IELPKTH.CAB; then | |
| cabextract IELPKTH.CAB | |
| if cp *.ttf /usr/share/fonts/truetype/msttcorefonts/; then | |
| if fc-cache -fv; then | |
| cd .. | |
| rm -r temp-tahomafont | |
| echo "Microsoft fonts are now installed" | |
| else | |
| echo "Could not rebuild font cache" | |
| exit -1 | |
| fi | |
| else | |
| echo "Could not copy the font to /usr/share/fonts/truetype/msttcorefonts/" | |
| exit -1 | |
| fi | |
| else | |
| echo "Could not download Tahoma font" | |
| exit -1 | |
| fi | |
| else | |
| echo "Could not install msttcorefonts package" | |
| exit -1 | |
| fi | |
| else | |
| echo "Run 'sudo ./addfonts.sh'" | |
| exit 0 | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment