Created
January 10, 2021 20:26
-
-
Save johnrizzo1/c729e2b8e14cfcad96619ead416f1dec to your computer and use it in GitHub Desktop.
Script to install the latest nerd fonts
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
install_nerd_fonts() { | |
# https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/JetBrainsMono.zip | |
TMPDIR=/tmp/nerd-font-install | |
URL="https://github.com/ryanoasis/nerd-fonts/releases/download" | |
VERSION="v2.1.0" | |
FONTS=( | |
3270 | |
Agave AnonymousPro Arimo AurulentSansMono | |
BigBlueTerminal BitstreamVeraSansMono | |
CascadiaCode CodeNewRoman Cousine | |
DaddyTimeMono DejaVuSansMono DroidSansMono | |
FantasqueSansMono FiraCode FiraMono | |
Go-Mono Gohu | |
Hack Hasklig HeavyData Hermit | |
iA-Writer IBMPlexMono Inconsolata InconsolataGo InconsolataLGC Iosevka | |
JetBrainsMono | |
Lekton LiberationMono | |
Meslo Monofur Monoid Mononoki MPlus | |
Noto | |
OpenDyslexic Overpass | |
ProFont ProggyClean | |
RobotoMono | |
ShareTechMono SourceCodePro SpaceMono | |
Terminus Tinos | |
Ubuntu UbuntuMono | |
VictorMono | |
) | |
if [ ! -d $TMPDIR ]; then | |
printf "%s doesn't exist. Creating %s\n" $TMPDIR $TMPDIR | |
mkdir -p $TMPDIR | |
fi | |
printf "[-] Installing Fonts %s [-]\n" | |
for font in "${FONTS[@]}" | |
do | |
printf "\t%s\n" $font | |
printf -v dlurl "%s/%s/%s.zip" $URL $VERSION $font | |
( | |
cd $TMPDIR | |
wget --quiet $dlurl | |
unzip -o -qq $font.zip -d $HOME/.fonts | |
) | |
done | |
printf "[-] Updating Font Cache [-]\n" | |
fc-cache -fv 2>&1> /dev/null | |
printf "[-] Done!!! [-]" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment