Skip to content

Commit

Permalink
feat(nerdfonts): add script to download
Browse files Browse the repository at this point in the history
  • Loading branch information
aikow committed Nov 27, 2024
1 parent 7be02ac commit eb1d82d
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions config/nerdfonts/scripts/download_ubuntu
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash

declare -a fonts=(
FiraCode
FiraMono
Hack
Iosevka
JetBrainsMono
RobotoMono
SourceCodePro
Ubuntu
UbuntuMono
)

version='3.3.0'
fonts_dir="${HOME}/.local/share/fonts"

if [[ ! -d "$fonts_dir" ]]; then
mkdir -p "$fonts_dir"
fi

for font in "${fonts[@]}"; do
zip_file="${font}.zip"
download_url="https://github.com/ryanoasis/nerd-fonts/releases/download/v${version}/${zip_file}"
echo "Downloading $download_url"
wget "$download_url"
unzip "$zip_file" -d "$fonts_dir"
rm "$zip_file"
done

find "$fonts_dir" -name '*Windows Compatible*' -delete

fc-cache -fv

0 comments on commit eb1d82d

Please sign in to comment.