diff options
author | Raul Benencia <raul@thousandeyes.com> | 2024-11-01 16:57:16 -0700 |
---|---|---|
committer | Raul Benencia <raul@thousandeyes.com> | 2024-11-01 16:57:16 -0700 |
commit | e5b6ab8d2eecfbf3edf40f5c8e831e2abff64c69 (patch) | |
tree | e9d1a812acfb7093cef213652c618e2dac36164d /bin/setup-install-fonts | |
parent | 012c3033850d1cfaab6a6cb117abee2cbe84d21e (diff) |
fonts: automate installation
Diffstat (limited to 'bin/setup-install-fonts')
-rwxr-xr-x | bin/setup-install-fonts | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/bin/setup-install-fonts b/bin/setup-install-fonts new file mode 100755 index 0000000..ea96873 --- /dev/null +++ b/bin/setup-install-fonts @@ -0,0 +1,26 @@ +#!/bin/bash + +set -e + +FONT_DIR="$HOME/.local/share/fonts" +TEMP_DIR=$(mktemp -d) + +mkdir -p "$FONT_DIR" + +pushd $TEMP_DIR +curl -s 'https://api.github.com/repos/be5invis/Iosevka/releases/latest' | \ + jq -r ".assets[] | .browser_download_url" | \ + grep PkgTTC-Iosevka | \ + xargs -n 1 curl -L -O --fail --silent --show-error + +for f in *.zip; do + unzip "$f" +done + +mv *.ttc "$FONT_DIR/" +fc-cache -f -v "$FONT_DIR" + +popd +rm -rf "$TEMP_DIR" + +echo "Iosevka fonts have been installed." |