41 lines
1.2 KiB
Bash
Executable File
41 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
echo "Downloading 'font-patcher' script..."
|
|
curl -fsSL https://github.com/ryanoasis/nerd-fonts/raw/master/font-patcher -o ./font-patcher
|
|
chmod 755 ./font-patcher
|
|
|
|
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"
|
|
"powerline-symbols/PowerlineSymbols.otf"
|
|
"weather-icons/weathericons-regular-webfont.ttf"
|
|
"NerdFontsSymbols 1000 EM Nerd Font Complete Blank.sfd"
|
|
"NerdFontsSymbols 2048 EM Nerd Font Complete Blank.sfd"
|
|
"Pomicons.otf"
|
|
"PowerlineExtraSymbols.otf"
|
|
"Symbols-1000-em Nerd Font Complete.ttf"
|
|
"Symbols-2048-em Nerd Font Complete.ttf"
|
|
"Unicode_IEC_symbol_font.otf"
|
|
"devicons.ttf"
|
|
"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}"
|
|
|
|
curl -fsSL ${percent_encoded_uri} -o "src/glyphs/${glyph}"
|
|
done
|
|
find ./src/glyphs/ -type f -exec chmod 644 '{}' \;
|