summaryrefslogtreecommitdiff
path: root/modulemanager
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-04-20 17:40:12 +0200
committerAttila Molnar <attilamolnar@hush.com>2015-04-20 17:40:12 +0200
commit8f5efbc7aa33b792e02d01e3288f553e6e98ccaa (patch)
tree54a67ebd11fac07d630fa03acad7797b2f781e80 /modulemanager
parentdda1d696c1316b09d65763b4f12bc2b63cfbbe72 (diff)
parent1548078e5dc304814669cd1ea052f92be9d1ac40 (diff)
Merge insp20
Diffstat (limited to 'modulemanager')
-rwxr-xr-xmodulemanager11
1 files changed, 8 insertions, 3 deletions
diff --git a/modulemanager b/modulemanager
index ee281d7fa..e859f683b 100755
--- a/modulemanager
+++ b/modulemanager
@@ -345,11 +345,16 @@ for my $mod (sort keys %todo) {
}
$mod_versions{$mod} = $ver;
- my $stat = getstore($url, "src/modules/$mod.cpp");
- if ($stat == 200) {
+ my $ua = LWP::UserAgent->new(ssl_opts => { verify_hostname => 0 });
+ my $response = $ua->get($url);
+
+ if ($response->is_success) {
+ open(MF, ">src/modules/$mod.cpp") or die "\nFilesystem not writable: $!";
+ print MF $response->decoded_content;
+ close(MF);
print " - done\n";
} else {
- print " - HTTP $stat\n";
+ printf "\nHTTP %s: %s\n", $response->code, $response->message;
}
}