in build.py, remove existing files before creating symlinks

This commit is contained in:
rolux 2012-12-29 18:01:03 +01:00
parent 7f76d596ba
commit 74debe7363

View file

@ -318,7 +318,8 @@ def write_file(file, data):
def write_link(source, target):
print 'linking', source, 'to', target
write_path(target)
if os.path.lexists(target):
# remove files, symlinks *and broken symlinks*
if os.path.exists(target) or os.path.lexists(target):
os.unlink(target)
os.symlink(source, target)