Migrate update-on-ox to use bypy

This commit is contained in:
Kovid Goyal 2020-06-06 09:11:50 +05:30
parent 1cb183f5e1
commit 03e0bf4c0e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -49,10 +49,9 @@ def run(what):
with open(__file__, 'rb') as f:
script = f.read().decode('utf-8')
script = script[:script.find('# EOF_REMOTE')].replace('if False:', 'if True:', 1)
os.chdir(os.path.expanduser('~/work/build-kitty'))
with tempfile.NamedTemporaryFile(prefix='install-dmg-', suffix='.py') as f:
run('./osx kitty --debug-build')
run('python ../bypy macos program --dont-strip')
f.write(script.encode('utf-8'))
f.flush()
run(f'scp build/osx/dist/{dmg} {f.name} {HOST}:/tmp')
run(f'scp bypy/b/macos/dist/{dmg} {f.name} {HOST}:/tmp')
run(f'ssh {HOST} python /tmp/{os.path.basename(f.name)} /tmp/{dmg}')