Follow source symlink

This commit is contained in:
benrubson
2017-02-25 14:20:32 +01:00
parent ca02503397
commit 348f8b3ee6

View File

@ -21,6 +21,9 @@ def link(source, dest, verbase=False):
raise LinkProjectError("%s not exist." % source)
print("Link %s -> %s" % (source, dest))
if os.path.islink(source):
subprocess.check_call(['cp', '-aH', source, dest])
else:
subprocess.check_call(['cp', '-al', source, dest])