[packages/rpm-build-tools] run wget --help once

atler atler at pld-linux.org
Thu Oct 29 13:03:12 CET 2020


commit 204944374e9a238b8f1e315d204bda5423fbc276
Author: Jan Palus <atler at pld-linux.org>
Date:   Thu Oct 29 12:34:36 2020 +0100

    run wget --help once

 builder.sh | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/builder.sh b/builder.sh
index f138da9..23e1822 100755
--- a/builder.sh
+++ b/builder.sh
@@ -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
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/1d8d84a580565981baeefff8fb3677fd644aac9b



More information about the pld-cvs-commit mailing list