Fix terminfo file not being used on OS X

On OS X tic has a different directory layout than on linux. Sigh.
This commit is contained in:
Kovid Goyal
2017-01-23 08:56:52 +05:30
parent 49ea4f736d
commit 3cbb0b22dc
3 changed files with 13 additions and 4 deletions

View File

@@ -217,15 +217,16 @@ def safe_makedirs(path):
def package(args): # {{{
ddir = args.prefix
libdir = os.path.join(ddir, 'lib', 'kitty')
terminfo_dir = os.path.join(ddir, 'share/terminfo/x')
terminfo_sdir = ('78' if isosx else 'x')
terminfo_dir = os.path.join(ddir, 'share/terminfo/' + terminfo_sdir)
if os.path.exists(libdir):
shutil.rmtree(libdir)
os.makedirs(os.path.join(libdir, 'terminfo/x'))
os.makedirs(os.path.join(libdir, 'terminfo/' + terminfo_sdir))
os.makedirs(os.path.join(libdir, 'logo'))
safe_makedirs(terminfo_dir)
shutil.copy2('__main__.py', libdir)
shutil.copy2('terminfo/x/xterm-kitty', terminfo_dir)
shutil.copy2('terminfo/x/xterm-kitty', os.path.join(libdir, 'terminfo/x'))
shutil.copy2('terminfo/x/xterm-kitty', os.path.join(libdir, 'terminfo/' + terminfo_sdir))
shutil.copy2('logo/kitty.rgba', os.path.join(libdir, 'logo'))
def src_ignore(parent, entries):