From f77573d7f7ae9bf26c019711805a1f3680abcf6d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 11 Jan 2010 10:33:58 -0700 Subject: [PATCH] Linux install: remove broken symlinks when installing launchers, instead of erroring out --- setup/install.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup/install.py b/setup/install.py index 20a484bf6f..56546cd7d4 100644 --- a/setup/install.py +++ b/setup/install.py @@ -191,6 +191,8 @@ class Develop(Command): 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)