Make NERD font available in CI

This commit is contained in:
Kovid Goyal 2024-07-02 19:42:31 +05:30
parent f8e9040d86
commit 28a5bfe379
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -15,6 +15,7 @@ from urllib.request import urlopen
BUNDLE_URL = 'https://download.calibre-ebook.com/ci/kitty/{}-64.tar.xz'
FONTS_URL = 'https://download.calibre-ebook.com/ci/fonts.tar.xz'
NERD_URL = 'https://github.com/ryanoasis/nerd-fonts/releases/latest/download/NerdFontsSymbolsOnly.tar.xz'
is_bundle = os.environ.get('KITTY_BUNDLE') == '1'
is_macos = 'darwin' in sys.platform.lower()
SW = ''
@ -67,6 +68,10 @@ def install_fonts() -> None:
os.makedirs(fonts_dir, exist_ok=True)
with tarfile.open(fileobj=io.BytesIO(data), mode='r:xz') as tf:
tf.extractall(fonts_dir)
with urlopen(NERD_URL) as f:
data = f.read()
with tarfile.open(fileobj=io.BytesIO(data), mode='r:xz') as tf:
tf.extractall(fonts_dir)
def install_deps() -> None: