More robust copying of terminfo

Dont use symlinks in the tarball, instead create them
in the bootstrap scripts, only if needed.
This commit is contained in:
Kovid Goyal 2022-03-10 21:08:20 +05:30
parent a9de91087a
commit f774841ee0
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
5 changed files with 15 additions and 10 deletions

View file

@ -11,7 +11,7 @@ import sys
import tempfile
def compile_terminfo(base, add_other_versions=False):
def compile_terminfo(base):
with tempfile.TemporaryDirectory() as tdir:
proc = subprocess.run(['tic', '-x', f'-o{tdir}', 'terminfo/kitty.terminfo'], check=True, stderr=subprocess.PIPE)
regex = '^"terminfo/kitty.terminfo", line [0-9]+, col [0-9]+, terminal \'xterm-kitty\': older tic versions may treat the description field as an alias$'
@ -29,13 +29,6 @@ def compile_terminfo(base, add_other_versions=False):
os.makedirs(odir, exist_ok=True)
ofile = os.path.join(odir, xterm_kitty)
shutil.move(tfile, ofile)
if add_other_versions:
shutil.copy2('terminfo/kitty.terminfo', base)
for x in os.listdir('terminfo'):
if x == 'kitty.terminfo':
continue
if not os.path.exists(os.path.join(base, x)):
os.symlink(directory, os.path.join(base, x))
def generate_terminfo():