From e5b6ab8d2eecfbf3edf40f5c8e831e2abff64c69 Mon Sep 17 00:00:00 2001 From: Raul Benencia Date: Fri, 1 Nov 2024 16:57:16 -0700 Subject: fonts: automate installation --- bin/setup-install-fonts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 bin/setup-install-fonts (limited to 'bin/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." -- cgit v1.2.3