install-font-iosevka.sh 492 B

12345678910111213141516171819
  1. #!/usr/bin/env bash
  2. set -euo pipefail # bash strict mode
  3. token="$(pass show www/github.com | grep token | cut -d' ' -f2-)"
  4. output="/tmp/latest"
  5. fonts="/tmp/iosevka.zip"
  6. curl \
  7. -H "Accept: application/vnd.github+json" \
  8. -H "Authorization: Bearer ${token}" \
  9. https://api.github.com/repos/be5invis/Iosevka/releases/latest -o "$output"
  10. link="$(awk -F \" '/browser_download_url/ {print $4; exit}' "$output")"
  11. wget "$link" -O "$fonts"
  12. cd /usr/share/fonts
  13. sudo unzip "$fonts"
  14. fc-cache -vf