Last active
June 1, 2024 05:34
-
-
Save jessenich/9b39b229b8f9cbbeed5059d60beed014 to your computer and use it in GitHub Desktop.
Revisions
-
jessenich revised this gist
Apr 29, 2023 . 1 changed file with 29 additions and 33 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,37 +1,33 @@ #!/usr/bin/env bash __main() { declare -a fonts=("Hack") gh_release=$(curl -s "https://api.github.com/repos/ryanoasis/nerd-fonts/releases/latest") if [[ "${fonts[0]}" = "all" ]]; then # Project all font names into source array echo "$gh_release" | \ jq -r '.assets | .[].name | rtrimstr(".zip")' | \ while IFS="" read -r font; do fonts+=($font); done else fonts=("$@") fi version=$(echo "$gh_release" | jq -r '.tag_name | ltrimstr("v")') fonts_dir="${XDG_DATA_HOME:-$HOME/.local/share}/fonts" mkdir -p "$fonts_dir" for font in "${fonts[@]}"; do download_url="https://github.com/ryanoasis/nerd-fonts/releases/download/$version/$font.zip" echo "Downloading $download_url" curl -fsSL "$download_url" -o "/tmp/$font.zip" unzip "/tmp/$font.zip" -d "$fonts_dir" rm -f "/tmp/$font.zip" done find "$fonts_dir" -name '*Windows Compatible*' -delete fc-cache -fv } __main "$@" -
jessenich revised this gist
Apr 7, 2023 . 1 changed file with 5 additions and 6 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -21,17 +21,16 @@ declare -a fonts=( UbuntuMono ) version=$(curl -s "https://api.github.com/repos/ryanoasis/nerd-fonts/releases/latest" | grep -Po '"tag_name":\s*"\Kv[^"]+') fonts_dir="${XDG_DATA_HOME:-$HOME/.local/share}/fonts" mkdir -p "$fonts_dir" for font in "${fonts[@]}"; do download_url="https://github.com/ryanoasis/nerd-fonts/releases/download/$version/$font.zip" echo "Downloading $download_url" curl -fsSL "$download_url" -o "/tmp/$font.zip" unzip "/tmp/$font.zip" -d "$fonts_dir" rm -f "/tmp/$font.zip" done find "$fonts_dir" -name '*Windows Compatible*' -delete -
jessenich revised this gist
Apr 5, 2023 . 1 changed file with 1 addition and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -23,10 +23,7 @@ declare -a fonts=( version='2.1.0' fonts_dir="${XDG_DATA_HOME:-$HOME/.local/share}/fonts" mkdir -p "$fonts_dir" for font in "${fonts[@]}"; do zip_file="${font}.zip" -
jessenich revised this gist
Apr 5, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -22,7 +22,7 @@ declare -a fonts=( ) version='2.1.0' fonts_dir="${XDG_DATA_HOME:-$HOME/.local/share}/fonts" if [[ ! -d "$fonts_dir" ]]; then mkdir -p "$fonts_dir" -
jessenich created this gist
Sep 23, 2022 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,41 @@ #!/bin/bash declare -a fonts=( BitstreamVeraSansMono CodeNewRoman DroidSansMono FiraCode FiraMono Go-Mono Hack Hermit JetBrainsMono Meslo Noto Overpass ProggyClean RobotoMono SourceCodePro SpaceMono Ubuntu UbuntuMono ) version='2.1.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