mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v2] ptxd_make_get: verbose on wget
@ 2024-08-19 20:03 Bruno Thomsen
  2024-09-12 12:11 ` [ptxdist] [APPLIED] " Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Bruno Thomsen @ 2024-08-19 20:03 UTC (permalink / raw)
  To: ptxdist; +Cc: Bruno Thomsen

Change wget progress to none when verbose is chosen,
so it's possible to see download URLs.

Tested on GNU Wget2 2.1.0 (Fedora 40) and GNU Wget 1.21.4 (Ubuntu 24.04).

Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
---
 scripts/lib/ptxd_make_get.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/lib/ptxd_make_get.sh b/scripts/lib/ptxd_make_get.sh
index 4951abe5abf1..eea56f8afbab 100644
--- a/scripts/lib/ptxd_make_get.sh
+++ b/scripts/lib/ptxd_make_get.sh
@@ -94,7 +94,11 @@ ptxd_make_get_http() {
 	return
     elif [ ! -e "${path}" ]; then
 	temp_file="$(mktemp "${path}.XXXXXXXXXX")" || ptxd_bailout "failed to create tempfile"
-	if [ -n "${PTXDIST_QUIET}" ]; then
+	if [ "${PTXDIST_VERBOSE}" == "1" ]; then
+		if wget --version | grep "GNU Wget2"; then
+		    progress=none
+		fi
+	elif [ -n "${PTXDIST_QUIET}" ]; then
 	    progress=dot
 	else
 	    progress=bar:force

base-commit: e16ba2b3690107c5b42109f6808c49912049be22
-- 
2.46.0




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ptxdist] [APPLIED] ptxd_make_get: verbose on wget
  2024-08-19 20:03 [ptxdist] [PATCH v2] ptxd_make_get: verbose on wget Bruno Thomsen
@ 2024-09-12 12:11 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2024-09-12 12:11 UTC (permalink / raw)
  To: ptxdist; +Cc: Bruno Thomsen

Thanks, applied as bb412159bc1cc375ee8523280c4857ae7dab14b6.

Michael

[sent from post-receive hook]

On Thu, 12 Sep 2024 14:11:52 +0200, Bruno Thomsen <bruno.thomsen@gmail.com> wrote:
> Change wget progress to none when verbose is chosen,
> so it's possible to see download URLs.
> 
> Tested on GNU Wget2 2.1.0 (Fedora 40) and GNU Wget 1.21.4 (Ubuntu 24.04).
> 
> Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
> Message-Id: <20240819200349.28458-1-bruno.thomsen@gmail.com>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/scripts/lib/ptxd_make_get.sh b/scripts/lib/ptxd_make_get.sh
> index 4951abe5abf1..eea56f8afbab 100644
> --- a/scripts/lib/ptxd_make_get.sh
> +++ b/scripts/lib/ptxd_make_get.sh
> @@ -94,7 +94,11 @@ ptxd_make_get_http() {
>  	return
>      elif [ ! -e "${path}" ]; then
>  	temp_file="$(mktemp "${path}.XXXXXXXXXX")" || ptxd_bailout "failed to create tempfile"
> -	if [ -n "${PTXDIST_QUIET}" ]; then
> +	if [ "${PTXDIST_VERBOSE}" == "1" ]; then
> +		if wget --version | grep "GNU Wget2"; then
> +		    progress=none
> +		fi
> +	elif [ -n "${PTXDIST_QUIET}" ]; then
>  	    progress=dot
>  	else
>  	    progress=bar:force



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-09-12 12:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-19 20:03 [ptxdist] [PATCH v2] ptxd_make_get: verbose on wget Bruno Thomsen
2024-09-12 12:11 ` [ptxdist] [APPLIED] " Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox