From da2485013aea91718b9e59e7fde292b3dc5efd6f Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 16 Oct 2015 05:26:48 -0400 Subject: sbosrcarch: fix dropbox links if they end in ?dl=0 (grr!) --- sbosrcarch | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sbosrcarch b/sbosrcarch index b2ee6ea..fe7b2ee 100755 --- a/sbosrcarch +++ b/sbosrcarch @@ -279,10 +279,9 @@ to the archive... but please pay attention to licensing! Some files (e.g. Oracle's Java) don't allow redistribution, so please don't include them in your archive. -Length: unspecified isn't handled (we just don't download -these). Specifically, dropbox URLs do this. Might add an option that -controls what to do about these, e.g. download & keep them all instead -of ignoring them all. Can still add them manually. +Length: unspecified isn't handled (we just don't download these). Might +add an option that controls what to do about these, e.g. download & +keep them all instead of ignoring them all. Can still add them manually. $sbogitdir and $archivedir must be located on the same filesystem, as files are moved around by linking them. Not a major problem, just @@ -555,9 +554,12 @@ sub wget_fake_head { return $size; } +# return url, in single quotes, plus some magic for dropbox urls +# to make them actually work with wget. sub wget_quote_url { my $url = shift; if($url =~ m,https?://(?:\w+\.)dropbox\.com/,) { + $url =~ s,\?dl=\d$,,; $url .= "?dl=1"; } return "'$url'"; -- cgit v1.2.3