Skip to content

Commit

Permalink
exclude broken links
Browse files Browse the repository at this point in the history
  • Loading branch information
Chushuhuch committed May 4, 2017
1 parent dc3d631 commit 1e00563
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/extra/serg_tools/copy_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ def copy_file(dest, file, igrec_dir, root):
shutil.copy2(os.path.join(root, file), dest_dir)


def exclude_broken_links(dir, files):
return [file for file in files if os.path.splitext(file)[1] == 'py']


def main():
dest = sys.argv[1]
clean = int(sys.argv[2]) > 0 if len(sys.argv) > 2 else True
Expand All @@ -35,7 +39,7 @@ def main():
for file in ["test_dataset/merged_reads.fastq"]:
copy_file(dest, os.path.split(file)[-1], igrec_dir, os.path.join(igrec_dir, os.path.dirname(file)))
for dir in ["build", "pipeline_makefiles", "configs", "data"]:
shutil.copytree(os.path.join(igrec_dir, dir), os.path.join(dest, dir))
shutil.copytree(os.path.join(igrec_dir, dir), os.path.join(dest, dir), exclude_broken_links)

os.system("git -C %s log | head > %s/GIT_REVISION" % (igrec_dir, dest))

Expand Down

0 comments on commit 1e00563

Please sign in to comment.