mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-09 18:14:27 +03:00
3cbb0b22dc
On OS X tic has a different directory layout than on linux. Sigh.
25 lines
607 B
Python
Executable File
25 lines
607 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import os
|
|
import sys
|
|
import shutil
|
|
import subprocess
|
|
|
|
base = os.path.dirname(os.path.abspath(__file__))
|
|
os.chdir(base)
|
|
sys.path.insert(0, base)
|
|
|
|
from kitty.terminfo import generate_terminfo # noqa
|
|
|
|
with open('terminfo/kitty.terminfo', 'w') as f:
|
|
f.write(generate_terminfo())
|
|
|
|
os.environ['TERMINFO'] = os.path.join(base, 'terminfo')
|
|
subprocess.check_call(['tic', 'terminfo/kitty.terminfo'])
|
|
# On OS X tic puts the compiled database into a different directory
|
|
try:
|
|
os.mkdir('terminfo/78')
|
|
except FileExistsError:
|
|
pass
|
|
shutil.copy2('terminfo/x/xterm-kitty', 'terminfo/78')
|