]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
don't override GETURI when using wget
authorJan Palus <atler@pld-linux.org>
Thu, 29 Oct 2020 11:30:52 +0000 (12:30 +0100)
committerJan Palus <atler@pld-linux.org>
Thu, 29 Oct 2020 11:58:22 +0000 (12:58 +0100)
-O is not passed correctly when fetching second and subsequent sources

builder.sh

index 04f7fe1056a0149e932a332266b856291061c64e..f138da9af25e46e02793b48882daade552a61618 100755 (executable)
@@ -271,15 +271,16 @@ download_axel() {
 
 download_wget() {
        local outfile=$1 url=$2 retval
-       wget --help 2>&1 | grep -q -- ' --no-check-certificate ' && WGET_OPTS="$WGET_OPTS --no-check-certificate"
-       wget --help 2>&1 | grep -q -- ' --inet ' && WGET_OPTS="$WGET_OPTS --inet"
-       wget --help 2>&1 | grep -q -- ' --retry-connrefused ' && WGET_OPTS="$WGET_OPTS --retry-connrefused"
-       wget --help 2>&1 | grep -q -- ' --no-iri ' && WGET_OPTS="$WGET_OPTS --no-iri"
-       WGET_OPTS="$WGET_OPTS --user-agent=$USER_AGENT"
-
-       GETURI="wget -c -nd -t$WGET_RETRIES $WGET_OPTS $IPOPT"
+       if [ -z "${WGET_OPTS_SET+x}" ]; then
+               wget --help 2>&1 | grep -q -- ' --no-check-certificate ' && WGET_OPTS="$WGET_OPTS --no-check-certificate"
+               wget --help 2>&1 | grep -q -- ' --inet ' && WGET_OPTS="$WGET_OPTS --inet"
+               wget --help 2>&1 | grep -q -- ' --retry-connrefused ' && WGET_OPTS="$WGET_OPTS --retry-connrefused"
+               wget --help 2>&1 | grep -q -- ' --no-iri ' && WGET_OPTS="$WGET_OPTS --no-iri"
+               WGET_OPTS="-c -nd -t$WGET_RETRIES $WGET_OPTS --user-agent=$USER_AGENT $IPOPT --passive-ftp"
+               WGET_OPTS_SET=1
+       fi
 
-       ${GETURI} --passive-ftp -O "$outfile" "$url"
+       wget $WGET_OPTS -O "$outfile" "$url"
        retval=$?
        if [ $retval -ne 0 ]; then
                if [ "`echo $url | grep -E 'ftp://'`" ]; then
This page took 0.06088 seconds and 4 git commands to generate.