Last active
March 17, 2022 11:54
-
-
Save untalsanders/3db814b022955c3a3b32f6f4738e8cd2 to your computer and use it in GitHub Desktop.
Install FiraCode Font
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
#!/usr/bin/env bash | |
fonts_dir="${HOME}/.local/share/fonts" | |
if [ ! -d "${fonts_dir}" ]; then | |
echo "mkdir -p $fonts_dir" | |
mkdir -p "${fonts_dir}" | |
else | |
echo "Found fonts dir $fonts_dir" | |
fi | |
for type in Bold Light Medium Regular Retina; do | |
file_path="${HOME}/.local/share/fonts/FiraCode-${type}.ttf" | |
file_url="https://github.com/tonsky/FiraCode/blob/master/distr/ttf/FiraCode-${type}.ttf?raw=true" | |
if [ ! -e "${file_path}" ]; then | |
echo "wget -O $file_path $file_url" | |
wget -O "${file_path}" "${file_url}" | |
else | |
echo "Found existing file $file_path" | |
fi; | |
done | |
echo "fc-cache -f" | |
fc-cache -f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment