scripts/download.pl: fix downloads with wget
[openwrt/staging/dedeckeh.git] / scripts / download.pl
index 90a1be4e2614826e7aede95e2b473578b7b26710..33e1e12c1ea8eb223c45edaa6dcddd3c676e16ea 100755 (executable)
@@ -82,8 +82,14 @@ sub download_cmd($) {
        }
 
        return $have_curl
-               ? (qw(curl -f --connect-timeout 20 --retry 5 --location), $check_certificate ? '' : '--insecure', shellwords($ENV{CURL_OPTIONS} || ''), $url)
-               : (qw(wget --tries=5 --timeout=20 --output-document=-), $check_certificate ? '' : '--no-check-certificate', shellwords($ENV{WGET_OPTIONS} || ''), $url)
+               ? (qw(curl -f --connect-timeout 20 --retry 5 --location),
+                       $check_certificate ? () : '--insecure',
+                       shellwords($ENV{CURL_OPTIONS} || ''),
+                       $url)
+               : (qw(wget --tries=5 --timeout=20 --output-document=-),
+                       $check_certificate ? () : '--no-check-certificate',
+                       shellwords($ENV{WGET_OPTIONS} || ''),
+                       $url)
        ;
 }