summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlibexec/poole11
1 files changed, 10 insertions, 1 deletions
diff --git a/libexec/poole b/libexec/poole
index ea66ccb..3735f90 100755
--- a/libexec/poole
+++ b/libexec/poole
@@ -452,6 +452,15 @@ def build(project, opts):
452 print(exc) 452 print(exc)
453 sys.exit(1) 453 sys.exit(1)
454 454
455 def copy(src, dst):
456 if os.path.islink(src):
457 linkto = os.readlink(src)
458 if os.path.isdir(dst):
459 dst = opj(dst, os.path.basename(src))
460 os.symlink(linkto, dst)
461 else:
462 shutil.copy2(src, opj(dir_out, cwd_site))
463
455 # ------------------------------------------------------------------------- 464 # -------------------------------------------------------------------------
456 # regex patterns and replacements 465 # regex patterns and replacements
457 # ------------------------------------------------------------------------- 466 # -------------------------------------------------------------------------
@@ -579,7 +588,7 @@ def build(project, opts):
579 else: 588 else:
580 src = opj(cwd, f) 589 src = opj(cwd, f)
581 try: 590 try:
582 shutil.copy(src, opj(dir_out, cwd_site)) 591 copy(src, opj(dir_out, cwd_site))
583 except OSError: 592 except OSError:
584 # some filesystems like FAT won't allow shutil.copy 593 # some filesystems like FAT won't allow shutil.copy
585 shutil.copyfile(src, opj(dir_out, cwd_site, f)) 594 shutil.copyfile(src, opj(dir_out, cwd_site, f))