aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-08-15 04:23:31 -0400
committerB. Watson <urchlay@slackware.uk>2023-08-15 04:23:31 -0400
commitef85e9d48fe1285bf6415f56ae023deac3f0d3ce (patch)
treee5ccbfc9f1ca91db6022a9a01e65276244de4714
parentccb92ae029eefd964b4bbb29f93c0b90e6f6fb6b (diff)
downloadsbo-maintainer-tools-ef85e9d48fe1285bf6415f56ae023deac3f0d3ce.tar.gz
sbolint: handle URLs with % in them (derp).
-rwxr-xr-xsbolint12
1 files changed, 6 insertions, 6 deletions
diff --git a/sbolint b/sbolint
index 1c40432..454e16b 100755
--- a/sbolint
+++ b/sbolint
@@ -516,7 +516,7 @@ sub dequote {
sub logmsg {
my $severity = shift;
my $format = shift;
- printf("$buildname: $severity: $format\n", @_);
+ print("$buildname: $severity: $format\n", @_);
}
sub log_error {
@@ -1135,14 +1135,14 @@ sub check_url {
}
sub curl_head_request {
- #return !system("curl --head --location --silent --fail $_[0] >/dev/null");
- #warn $_[1];
my $file = $_[0];
my $client_filename = $_[1];
$client_filename =~ s,.*/,,;
- my $curlcmd = "curl -m20 --head --location --silent --fail $_[1]";
- open my $pipe, "$curlcmd|";
- #warn "$curlcmd";
+
+ my @curlcmd = qw/curl --max-time 20 --head --location --silent --fail/;
+ push @curlcmd, $_[1];
+ open my $pipe, "-|", @curlcmd;
+
while(<$pipe>) {
chomp;
s/\r//;