diff options
Diffstat (limited to 'networking/wget.c')
-rw-r--r-- | networking/wget.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/networking/wget.c b/networking/wget.c index 65262e1..44c481a 100644 --- a/networking/wget.c +++ b/networking/wget.c @@ -283,13 +283,15 @@ enum { #if ENABLE_FEATURE_WGET_STATUSBAR static void progress_meter(int flag) { + int notty; + if (option_mask32 & WGET_OPT_QUIET) return; if (flag == PROGRESS_START) bb_progress_init(&G.pmt, G.curfile); - bb_progress_update(&G.pmt, + notty = bb_progress_update(&G.pmt, G.beg_range, G.transferred, (G.chunked || !G.got_clen) ? 0 : G.beg_range + G.transferred + G.content_len @@ -297,7 +299,8 @@ static void progress_meter(int flag) if (flag == PROGRESS_END) { bb_progress_free(&G.pmt); - bb_putchar_stderr('\n'); + if (notty == 0) + bb_putchar_stderr('\n'); /* it's tty */ G.transferred = 0; } } |