nerd-fonts/update.sh

40 lines
1.2 KiB
Bash
Raw Normal View History

2021-12-31 18:08:01 +01:00
#!/usr/bin/env bash
2021-11-15 14:02:33 +01:00
echo "Downloading 'font-patcher' script..."
2021-12-31 18:08:01 +01:00
curl -fsSL https://github.com/ryanoasis/nerd-fonts/raw/master/font-patcher -o ./font-patcher
2021-11-15 14:02:33 +01:00
chmod 755 ./font-patcher
2021-12-31 18:08:01 +01:00
for path in codicons font-awesome powerline-symbols weather-icons; do
mkdir -p ./src/glyphs/"$path"
done
echo "Downloading glyph fonts..."
glyphs=(
"codicons/codicon.ttf"
"font-awesome/FontAwesome.otf"
2023-03-22 18:08:11 +01:00
"materialdesign/MaterialDesignIconsDesktop.ttf"
"materialdesign/MaterialDesignIconsDesktop_orig.ttf"
2021-12-31 18:08:01 +01:00
"powerline-symbols/PowerlineSymbols.otf"
"weather-icons/weathericons-regular-webfont.ttf"
"Pomicons.otf"
"PowerlineExtraSymbols.otf"
"Unicode_IEC_symbol_font.otf"
"devicons.ttf"
2023-03-22 18:08:11 +01:00
"extraglyphs.sfd"
2021-12-31 18:08:01 +01:00
"font-awesome-extension.ttf"
"font-logos.ttf"
"materialdesignicons-webfont.ttf"
"octicons.ttf"
"original-source.otf"
)
upstream_src_glyphs_url="https://github.com/ryanoasis/nerd-fonts/raw/master/src/glyphs"
for glyph in "${glyphs[@]}"; do
# replace all `whitespace` characters with `%20`
percent_encoded_uri="${upstream_src_glyphs_url}/${glyph//\ /%20}"
2023-03-22 18:08:11 +01:00
curl -fSL ${percent_encoded_uri} -o "src/glyphs/${glyph}"
2021-12-31 18:08:01 +01:00
done
find ./src/glyphs/ -type f -exec chmod 644 '{}' \;