Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Jan 2025 14:22:44 GMT
From:      Renato Botelho <garga@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 19a6bc9f51e5 - main - fwget: Silence log() when -q is used
Message-ID:  <202501091422.509EMiam090049@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by garga:

URL: https://cgit.FreeBSD.org/src/commit/?id=19a6bc9f51e5c5705a2b396b0da61e6536acb4cb

commit 19a6bc9f51e5c5705a2b396b0da61e6536acb4cb
Author:     Renato Botelho <garga@FreeBSD.org>
AuthorDate: 2025-01-09 12:16:10 +0000
Commit:     Renato Botelho <garga@FreeBSD.org>
CommitDate: 2025-01-09 14:21:11 +0000

    fwget: Silence log() when -q is used
    
    Summary:
    Silence log function when -q parameter is used to prevent undesired output
    
    PR:             283939
    Reviewed By:    manu
    Differential Revision:  https://reviews.freebsd.org/D48391
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 usr.sbin/fwget/fwget.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/usr.sbin/fwget/fwget.sh b/usr.sbin/fwget/fwget.sh
index 3e2181e53b73..d87cd03aa139 100755
--- a/usr.sbin/fwget/fwget.sh
+++ b/usr.sbin/fwget/fwget.sh
@@ -47,7 +47,9 @@ EOF
 
 log()
 {
-	echo "$@"
+	if [ "${QUIET}" != "y" ]; then
+		echo "$@"
+	fi
 }
 
 log_verbose()



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202501091422.509EMiam090049>