Cleanup icdir creation

This commit is contained in:
Kovid Goyal 2021-07-13 08:00:15 +05:30
parent 0c193c3ab7
commit d55a86e39b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -908,13 +908,11 @@ def create_linux_bundle_gunk(ddir: str, libdir_name: str) -> None:
run_tool([make, 'docs'])
copy_man_pages(ddir)
copy_html_docs(ddir)
icdir = os.path.join(ddir, 'share', 'icons', 'hicolor', '256x256', 'apps')
safe_makedirs(icdir)
shutil.copy2('logo/kitty.png', icdir)
for (icdir, ext) in {'256x256': 'png', 'scalable': 'svg'}.items():
icdir = os.path.join(ddir, 'share', 'icons', 'hicolor', icdir, 'apps')
safe_makedirs(icdir)
shutil.copy2(f'logo/kitty.{ext}', icdir)
deskdir = os.path.join(ddir, 'share', 'applications')
icscaldir = os.path.join(ddir, 'share', 'icons', 'hicolor', 'scalable', 'apps')
safe_makedirs(icscaldir)
shutil.copy2('logo/kitty.svg', icscaldir)
safe_makedirs(deskdir)
with open(os.path.join(deskdir, 'kitty.desktop'), 'w') as f:
f.write(