aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2015-10-16 03:13:19 -0400
committerB. Watson <yalhcru@gmail.com>2015-10-16 03:13:19 -0400
commit61d03d928698925593e5efaf48fe8229036a6db8 (patch)
tree0cfa5dbf4cd0e5858e40e200fc66dced7fd8ac4b
parentd1cf05f126174fd6a36f26faf17823b2baf6e86d (diff)
downloadsbostuff-61d03d928698925593e5efaf48fe8229036a6db8.tar.gz
sbosrcarch: fix builds where DOWNLOAD="UNSUPPORTED"
-rwxr-xr-xsbosrcarch19
1 files changed, 12 insertions, 7 deletions
diff --git a/sbosrcarch b/sbosrcarch
index 437a7d6..49ca980 100755
--- a/sbosrcarch
+++ b/sbosrcarch
@@ -400,21 +400,26 @@ sub parse_info {
$got =~ s/\\\s*\n//gs; # join \ continuation lines
$got =~ s/[ \t]+/ /g; # condense whitespace
- $got =~ /DOWNLOAD(?:_x86_64)?="([^"]+)"/;
- my @urls = split " ", $1;
+ my @urls = ();
+ while($got =~ /DOWNLOAD(?:_x86_64)?="((?:htt|ft)[^"]+)"/gc) {
+ push @urls, split " ", $1;
+ }
- $got =~ /MD5SUM(?:_x86_64)?="([^"]+)"/;
- my @md5s = split " ", $1;
+ my @md5s = ();
+ while($got =~ /MD5SUM(?:_x86_64)?="([^"]+)"/gc) {
+ push @md5s, split " ", $1;
+ }
for(@md5s) {
- die "bad md5sum in $file\n" unless /^[0-9a-f]{32}$/;
+ print "bad md5sum in $file\n", return undef unless /^[0-9a-f]{32}$/;
}
my %ret;
for(@urls) {
- next if /^un(test|support)ed$/i;
+ my $m = shift @md5s;
+ #next if /^un(test|support)ed$/i; # no longer need
print "bad URL in $file (backtick)\n", next if /`/; # backticks should never occur!
- $ret{$_} = shift @md5s;
+ $ret{$_} = $m;
}
return \%ret;