diff --git a/solenv/bin/modules/ExtensionsLst.pm b/solenv/bin/modules/ExtensionsLst.pm index 60080ca..a56af40 100644 --- a/solenv/bin/modules/ExtensionsLst.pm +++ b/solenv/bin/modules/ExtensionsLst.pm @@ -423,6 +423,20 @@ sub Download (@) if ( ! -f $candidate) { push @missing, $entry; + print "downloading $candidate\n"; + } + else + { + open(my $cur_oxt, $candidate) or next; # TODO die or next? + binmode($cur_oxt); + my $file_md5 = Digest::MD5->new->addfile(*$cur_oxt)->hexdigest; + close($cur_oxt); + if ($md5sum ne $file_md5) + { + push @missing, $entry; + print "updating $candidate\n"; + unlink($candidate); # needed? rename overwrites, at least in Linux + } } } if ($#missing >= 0)