Skip to content
Snippets Groups Projects
Commit 70cbf28e authored by Glenn Proctor's avatar Glenn Proctor
Browse files

Corrected bug that was resulting in old files not being deleted for first source downloaded.

parent 85ce2e7f
No related branches found
No related tags found
No related merge requests found
......@@ -98,13 +98,14 @@ sub run {
$dir = $base_dir . "/" . sanitise($type);
foreach my $urls (@files){
my ($file) = $urls =~ /.*\/(.*)/;
$last_type = $type;
if (!$skipdownload) {
rmtree $dir if ($type ne $last_type);
mkdir $dir if (!-e $dir);
$last_type = $type;
print "Downloading $urls to $dir/$file\n";
my $result = system("wget", "--quiet","--directory-prefix=$dir", $urls);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment