calibre -s now waits for calibre to shutdown

This commit is contained in:
Kovid Goyal 2012-06-23 23:09:36 +05:30
parent 5d982f24e5
commit 957c80e02f
2 changed files with 5 additions and 1 deletions

View File

@ -195,7 +195,7 @@ It can get tiresome to keep re-adding a plugin to calibre to test small changes.
Once you've located the zip file of your plugin you can then directly update it with your changes instead of re-adding it each time. To do so from the command line, in the directory that contains your plugin source code, use::
calibre -s; sleep 4s; zip -R /path/to/plugin/zip/file.zip *; calibre
calibre -s; zip -R /path/to/plugin/zip/file.zip *; calibre
This will shutdown a running calibre. Wait for the shutdown to complete, then update your plugin files and relaunch calibre.
It relies on the freely available zip command line tool.

View File

@ -323,6 +323,10 @@ def communicate(opts, args):
if opts.shutdown_running_calibre:
t.conn.send('shutdown:')
from calibre.utils.lock import singleinstance
prints(_('Shutdown command sent, waiting for shutdown...'))
while not singleinstance('calibre GUI'):
time.sleep(0.1)
else:
if len(args) > 1:
args[1] = os.path.abspath(args[1])