Merge pull request #1 from benrubson/symlink

Follow source symlink
This commit is contained in:
Synology Open Source
2017-03-01 11:21:23 +08:00
committed by GitHub

View File

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