Skip to content

Commit

Permalink
#7 more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sapetnioc committed Jun 7, 2024
1 parent 25d3312 commit 86aede4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions bin/neuro-forge
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@ def init(channel_dir):
if variants.exists():
command.extend(["-m", str(variants)])
check_call(command)


# Cleanup and create channel index
for i in ("bld", "src_cache", ".rattler", ".cache"):
to_delete = channel_dir / i
if to_delete.exists():
shutil.rmtree(to_delete)
check_call(["conda", "index", channel_dir])
to_delete = [channel_dir / i for i in ("bld", "src_cache", ".rattler", ".cache")]
to_delete.extend(channel_dir.glob("*/.cache"))
for i in to_delete:
if i.exists():
shutil.rmtree(i)
if save_datalad:
check_call(
["datalad", "save", "-m", "Created initial packages", str(channel_dir)]
Expand Down

0 comments on commit 86aede4

Please sign in to comment.