mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Linux install: remove broken symlinks when installing launchers, instead of erroring out
This commit is contained in:
parent
94ce2cf8da
commit
f77573d7f7
@ -191,6 +191,8 @@ class Develop(Command):
|
|||||||
if not os.path.exists(self.staging_bindir):
|
if not os.path.exists(self.staging_bindir):
|
||||||
os.makedirs(self.staging_bindir)
|
os.makedirs(self.staging_bindir)
|
||||||
self.info('Installing binary:', path)
|
self.info('Installing binary:', path)
|
||||||
|
if os.path.lexists(path) and not os.path.exists(path):
|
||||||
|
os.remove(path)
|
||||||
open(path, 'wb').write(script)
|
open(path, 'wb').write(script)
|
||||||
os.chmod(path, self.MODE)
|
os.chmod(path, self.MODE)
|
||||||
self.manifest.append(path)
|
self.manifest.append(path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user