exclude existing experiments when archiving
This commit is contained in:
@ -43,9 +43,19 @@ my %handlers = (
|
|||||||
|
|
||||||
# Download ran experiments from mars
|
# Download ran experiments from mars
|
||||||
my @dirs = Mars::find_remote_subdirs($remote_builds_dir);
|
my @dirs = Mars::find_remote_subdirs($remote_builds_dir);
|
||||||
|
|
||||||
|
my @existing = Util::find_subdirs($local_archive_dir);
|
||||||
|
my @new_dirs;
|
||||||
|
foreach (@dirs) {
|
||||||
|
my $dir = $_ =~ s/:/-/gr;
|
||||||
|
unless ( grep { /$dir/ } @existing ) {
|
||||||
|
push @new_dirs, $_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
my @selected_dirs =
|
my @selected_dirs =
|
||||||
TUI::select_from_list( "Select Experiments to Download from Mars",
|
TUI::select_from_list( "Select Experiments to Download from Mars",
|
||||||
1, @dirs );
|
1, @new_dirs );
|
||||||
die "No experiment selected" unless @selected_dirs;
|
die "No experiment selected" unless @selected_dirs;
|
||||||
Mars::download_dir( "$remote_builds_dir/$_",
|
Mars::download_dir( "$remote_builds_dir/$_",
|
||||||
"$local_archive_dir/" . $_ =~ s/:/-/gr )
|
"$local_archive_dir/" . $_ =~ s/:/-/gr )
|
||||||
|
|||||||
Reference in New Issue
Block a user