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 | |
parent | 012c3033850d1cfaab6a6cb117abee2cbe84d21e (diff) |
fonts: automate installation
-rw-r--r-- | Makefile | 3 | ||||
-rwxr-xr-x | bin/setup-install-fonts | 26 |
2 files changed, 29 insertions, 0 deletions
@@ -8,3 +8,6 @@ bin_file_name := 10-$(cur_dir) all: $(bin_dir)/pycombine -e '(Makefile|README.md|debian)' "$(HOME)" "$(repo_dir)" xdg-settings set default-url-scheme-handler org-protocol org-protocol.desktop + +fonts: + $(bin_dir)/setup-install-fonts 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." |