fwget: Simplify logic

Summary:
Use log() to print messages that should be supressed when -q is in use.

No functional changes intended.

Differential Revision:	https://reviews.freebsd.org/D48393
Reviewed By:	manu
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit fb98fc4755)
This commit is contained in:
Renato Botelho 2025-01-09 11:24:18 -03:00
parent e6061e54d6
commit 4cdfa4e8db

View file

@ -120,16 +120,12 @@ done
case "${packages}" in
""|^[[:space:]]*$)
if [ "${QUIET}" != "y" ]; then
echo "No firmware packages to install."
fi
log "No firmware packages to install."
exit 0
;;
esac
if [ "${QUIET}" != "y" ]; then
echo "Needed firmware packages: '${packages}'"
fi
log "Needed firmware packages: '${packages}'"
if [ "${DRY_RUN}" = "y" ]; then
if [ "${QUIET}" = "y" ]; then
for pkg in ${packages}; do