-
-
Save briskycat/d30c65c20e0f9c63f7ceaad65f577058 to your computer and use it in GitHub Desktop.
A bash script to install all Google Fonts, system wide, on debian based systems (ex. 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/sh | |
# Written by: Keefer Rourke <https://krourke.org> | |
# Based on AUR package <https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ttf-google-fonts-git> | |
srcdir="/tmp/google-fonts" | |
pkgdir="/usr/share/fonts/truetype/google-fonts" | |
giturl="git://github.com/google/fonts.git" | |
# dependancies: fonts-cantarell, ttf-ubuntu-font-family, git | |
sudo apt-get install -y --no-install-recommends fonts-cantarell ttf-ubuntu-font-family git | |
mkdir $srcdir | |
cd $srcdir | |
echo "Cloning Git repository..." | |
git clone $giturl | |
echo "Installing fonts..." | |
sudo mkdir -p $pkgdir | |
sudo find $srcdir -type f -name "*.ttf" -exec install -Dm644 {} $pkgdir \; | |
echo "Cleaning up..." | |
sudo find $pkgdir -type f -name "Cantarell-*.tff" -exec rm -f "{}" \; | |
sudo find $pkgdir -type f -name "Ubuntu-*.tff" -exec rm -f "{}" \; | |
# provides roboto | |
sudo apt-get --purge remove fonts-roboto | |
echo "Updating font-cache..." | |
sudo fc-cache -f > /dev/null | |
sudo rm -rf /tmp/google-fonts | |
echo "Done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment