mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 13:12:35 +02:00
Linux install: remove broken symlinks when installing launchers, instead of erroring out
This commit is contained in:
parent
94ce2cf8da
commit
f77573d7f7
1 changed files with 2 additions and 0 deletions
|
|
@ -191,6 +191,8 @@ def write_template(self, name, mod, func):
|
|||
if not os.path.exists(self.staging_bindir):
|
||||
os.makedirs(self.staging_bindir)
|
||||
self.info('Installing binary:', path)
|
||||
if os.path.lexists(path) and not os.path.exists(path):
|
||||
os.remove(path)
|
||||
open(path, 'wb').write(script)
|
||||
os.chmod(path, self.MODE)
|
||||
self.manifest.append(path)
|
||||
|
|
|
|||
Loading…
Reference in a new issue