]> git.pld-linux.org Git - packages/rpm-build-tools.git/blobdiff - builder.sh
run wget --help once
[packages/rpm-build-tools.git] / builder.sh
index f138da9af25e46e02793b48882daade552a61618..23e1822f80523722b815c8236ac461cbbe1ea263 100755 (executable)
@@ -270,12 +270,13 @@ download_axel() {
 }
 
 download_wget() {
-       local outfile=$1 url=$2 retval
+       local outfile=$1 url=$2 retval wget_help
        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_help="$(wget --help 2>&1)"
+               echo "$wget_help" | grep -q -- ' --no-check-certificate ' && WGET_OPTS="$WGET_OPTS --no-check-certificate"
+               echo "$wget_help" | grep -q -- ' --inet ' && WGET_OPTS="$WGET_OPTS --inet"
+               echo "$wget_help" | grep -q -- ' --retry-connrefused ' && WGET_OPTS="$WGET_OPTS --retry-connrefused"
+               echo "$wget_help" | 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
This page took 0.03743 seconds and 4 git commands to generate.