mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
Fix update-on-ox
This commit is contained in:
parent
c77156d47b
commit
411cd21e82
@ -51,10 +51,10 @@ def run(what):
|
|||||||
with open(__file__, 'rb') as f:
|
with open(__file__, 'rb') as f:
|
||||||
script = f.read().decode('utf-8')
|
script = f.read().decode('utf-8')
|
||||||
script = script[:script.find('# EOF_REMOTE')].replace('if False:', 'if True:', 1)
|
script = script[:script.find('# EOF_REMOTE')].replace('if False:', 'if True:', 1)
|
||||||
os.chdir(os.path.expanduser('~/work/build-calibre'))
|
|
||||||
with tempfile.NamedTemporaryFile(prefix='install-dmg-', suffix='.py') as f:
|
with tempfile.NamedTemporaryFile(prefix='install-dmg-', suffix='.py') as f:
|
||||||
run('./osx calibre')
|
run('./setup.py osx --dont-shutdown')
|
||||||
f.write(script.encode('utf-8'))
|
f.write(script.encode('utf-8'))
|
||||||
f.flush()
|
f.flush()
|
||||||
run(f'scp build/osx/dist/{dmg} {f.name} {HOST}:/tmp')
|
run(f'scp dist/{dmg} {f.name} {HOST}:/tmp')
|
||||||
run(f'ssh {HOST} python /tmp/{os.path.basename(f.name)} /tmp/{dmg}')
|
run(f'ssh {HOST} python /tmp/{os.path.basename(f.name)} /tmp/{dmg}')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user