diff options
author | B. Watson <yalhcru@gmail.com> | 2015-10-16 05:26:48 -0400 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2015-10-16 05:26:48 -0400 |
commit | da2485013aea91718b9e59e7fde292b3dc5efd6f (patch) | |
tree | 2220c245d7e88d162e45913965c9b05d08915ea2 /sbosrcarch | |
parent | 35d2140f91b61f74e239c5ac2bc5617ce934354c (diff) | |
download | sbostuff-da2485013aea91718b9e59e7fde292b3dc5efd6f.tar.gz |
sbosrcarch: fix dropbox links if they end in ?dl=0 (grr!)
Diffstat (limited to 'sbosrcarch')
-rwxr-xr-x | sbosrcarch | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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'"; |