Created
December 12, 2017 23:33
-
-
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
This file contains 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 | |
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