Skip to content

Instantly share code, notes, and snippets.

@gideao
Created December 12, 2017 23:33
Show Gist options
  • Save gideao/099588c6fdf17ed11d5706c98e3ddcf7 to your computer and use it in GitHub Desktop.
Save gideao/099588c6fdf17ed11d5706c98e3ddcf7 to your computer and use it in GitHub Desktop.
A simple installer of Adobe Fonts Source Code Pro for use in Ubuntu or Debian
#!/bin/bash
shopt -s extglob
font_dir="$HOME/.fonts/source-code-pro/"
source_dir="$PWD/source-code-pro/"
mkdir $source_dir
git clone https://github.com/adobe-fonts/source-code-pro.git $source_dir
fonts=`find $source_dir -iname '*.ttf'`
for i in $fonts
do
sufix_dir=${i//@($source_dir|font.ttf)}
dest_dir=$font_dir$sufix_dir
mkdir -p $dest_dir && mv $i $dest_dir
done
rm -rf $source_dir
fc-cache -f -v $font_dir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment