]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
run wget --help once
authorJan Palus <atler@pld-linux.org>
Thu, 29 Oct 2020 11:34:36 +0000 (12:34 +0100)
committerJan Palus <atler@pld-linux.org>
Thu, 29 Oct 2020 11:59:17 +0000 (12:59 +0100)
builder.sh

index f138da9af25e46e02793b48882daade552a61618..23e1822f80523722b815c8236ac461cbbe1ea263 100755 (executable)
@@ -270,12 +270,13 @@ download_axel() {
 }
 
 download_wget() {
 }
 
 download_wget() {
-       local outfile=$1 url=$2 retval
+       local outfile=$1 url=$2 retval wget_help
        if [ -z "${WGET_OPTS_SET+x}" ]; then
        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
                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.054625 seconds and 4 git commands to generate.