Skip to content

Instantly share code, notes, and snippets.

@inscapist
Forked from muammar/getFirafonts.sh
Created March 23, 2017 04:11
Show Gist options
  • Save inscapist/086a73c5b07e01d76d9c641574a2905d to your computer and use it in GitHub Desktop.
Save inscapist/086a73c5b07e01d76d9c641574a2905d to your computer and use it in GitHub Desktop.
Download and install Fira fonts in Linux or Mac OS X
#!/bin/bash
## cf from http://programster.blogspot.com/2014/05/ubuntu-14-desktop-install-fira-sans-and.html
cd /tmp
# install unzip just in case the user doesn't already have it.
if [[ `uname` = Linux ]]; then
sudo apt-get install unzip -y
wget "http://www.carrois.com/downloads/fira_4_1/FiraFonts4106.zip"
wget "http://www.carrois.com/downloads/fira_mono_3_2/FiraMonoFonts3206.zip"
unzip FiraSans4106.zip
unzip FiraMono3206.zip
sudo mkdir -p /usr/share/fonts/truetype/FiraSans
sudo mkdir -p /usr/share/fonts/opentype/FiraSans
sudo cp Fira*/WEB/*.ttf /usr/share/fonts/truetype/FiraSans/
sudo cp Fira*/OTF/Fira* /usr/share/fonts/opentype/FiraSans/
sudo fc-cache -fv
else
wget https://github.com/mozilla/Fira/archive/4.202.zip
unzip 4.202.zip
font_dir="$HOME/Library/Fonts"
mkdir -p $font_dir
cp Fira-4.202/otf/* $font_dir/
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment