Ensure a kitty executable is on PATH even when running from source

This commit is contained in:
Kovid Goyal
2018-01-05 14:56:01 +05:30
parent 973352a98d
commit 88e9c21a3b
3 changed files with 43 additions and 19 deletions

13
launcher/kitty Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env python3
# vim:fileencoding=utf-8
# License: GPL v3 Copyright: 2018, Kovid Goyal <kovid at kovidgoyal.net>
import os
import sys
base = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, base)
with open(os.path.join(base, '__main__.py')) as f:
src = f.read()
code = compile(src, f.name, 'exec')
exec(code, {'__name__': '__main__'})