Last active
May 18, 2021 03:12
-
-
Save renatoassis01/327adfc5e80a7b3537c9918254cdf468 to your computer and use it in GitHub Desktop.
script install fonts https://github.com/ryanoasis/nerd-fonts
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 | |
set -euo pipefail | |
echo -e "Downloading Nerd Fonts from https://github.com/ryanoasis/nerd-fonts" | |
mkdir -p $HOME/.local/share/fonts | |
TEMP_DIR_DOWNLOAD_FONTS=$(mktemp -d) | |
cd $TEMP_DIR_DOWNLOAD_FONTS | |
VERSION_RELEASE=v2.1.0 | |
# choice your fonts in assets files -> https://github.com/ryanoasis/nerd-fonts/releases | |
fonts=("CascadiaCode" | |
"VictorMono" | |
"JetBrainsMono" | |
"Iosevka" | |
"FiraCode" | |
"IBMPlexMono") | |
echo -e "Saving downloads in $TEMP_DIR_DOWNLOAD_FONTS" | |
for font in ${fonts[@]}; do | |
echo -e "Download font $font" | |
wget -q "https://github.com/ryanoasis/nerd-fonts/releases/download/$VERSION_RELEASE/${font}.zip" | |
done | |
for zipfile in *; do | |
echo -e "unzip font $zipfile in $HOME/.local/share/fonts" | |
unzip -q -o -j $zipfile -d $HOME/.local/share/fonts | |
done | |
echo -e "Run cache font" | |
fc-cache -f -v $HOME/.local/share/fonts | |
cd $HOME | |
# purge files download | |
rm -rf "$TEMP_DIR_DOWNLOAD_FONTS" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment