Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions bio/DataDownloader/lib/DataDownloader/Role/Source.pm
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,25 @@ sub _build_logger {
return make_logger();
}

has compare_to_existing => (
init_arg => 'COMPARE',
is => 'ro',
isa => 'Bool',
lazy_build => 1,
reader => 'compare_to_existing_version',
);

sub _build_compare_to_existing {
my $self = shift;
my $current_dir = $self->get_source_dir->subdir("current");

if ($self->compare_to_existing_version) {
if ($self->is_same_as($current_dir)) {
$self->info("Can't Download data for " . $self->get_title . " because it already exists in the current directory - skipping");
}
}
}

sub log_start {
my $self = shift;
$self->info("Starting data download for " . $self->get_title);
Expand Down