=================================================================== RCS file: /cvs/openbsd/fw_update/fw_install.sh,v retrieving revision 1.139 retrieving revision 1.140 diff -u -r1.139 -r1.140 --- openbsd/fw_update/fw_install.sh 2022/01/05 23:34:11 1.139 +++ openbsd/fw_update/fw_install.sh 2022/01/06 01:25:12 1.140 @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: fw_install.sh,v 1.139 2022/01/05 23:34:11 afresh1 Exp $ +# $OpenBSD: fw_install.sh,v 1.140 2022/01/06 01:25:12 afresh1 Exp $ # # Copyright (c) 2021 Andrew Hewus Fresh # @@ -239,7 +239,7 @@ local _cwd _pkg="$1" _pkgdir="${DESTDIR}/var/db/pkg" # TODO: Check hash for files before deleting - [ "$VERBOSE" -gt 1 ] && echo -n "Uninstall $_pkg ..." + [ "$VERBOSE" -gt 2 ] && echo -n "Uninstall $_pkg ..." _cwd="${_pkgdir}/$_pkg" if [ ! -e "$_cwd/+CONTENTS" ] || @@ -275,7 +275,7 @@ fi done - [ "$VERBOSE" -gt 1 ] && echo " done." + [ "$VERBOSE" -gt 2 ] && echo " done." return 0 } @@ -339,7 +339,7 @@ [ "$OPT_D" ] && usage 22 # Show the "Uninstalling" message when just deleting not upgrading - [ "$VERBOSE" -eq 1 ] && VEROBOSE=2 + [ "$VERBOSE" -gt 1 ] && VEROBOSE=3 set -A installed if [ "${devices[*]:-}" ]; then @@ -441,7 +441,7 @@ if [ -e "$f" ]; then if "$DOWNLOAD"; then - [ "$VERBOSE" -gt 0 ] && ! "$INSTALL" && + [ "$VERBOSE" -gt 1 ] && ! "$INSTALL" && echo "Keep/Verify ${f##*/}" "$DRYRUN" || verify "$f" || continue "$INSTALL" || kept="$kept,$d" @@ -478,17 +478,21 @@ f="${f##*/}" f="${f%.tgz}" if [ "$update" ]; then - if [ "$VERBOSE" -gt 0 ] && "$DRYRUN"; then - echo "Update $f" + if [ "$VERBOSE" -eq 1 ] && "$DOWNLOAD" && ! "$DRYRUN"; then + echo " updated." elif [ "$VERBOSE" -eq 1 ]; then - echo " updated." + echo "Update $f" + elif [ "$VERBOSE" -gt 0 ] && "$DRYRUN"; then + echo "Update $f" fi updated="$updated,$d" else - if [ "$VERBOSE" -gt 0 ] && "$DRYRUN"; then - echo "Install $f" + if [ "$VERBOSE" -eq 1 ] && "$DOWNLOAD" && ! "$DRYRUN"; then + echo " installed." elif [ "$VERBOSE" -eq 1 ]; then - echo " installed." + echo "Install $f" + elif [ "$VERBOSE" -gt 0 ] && "$DRYRUN"; then + echo "Install $f" fi added="$added,$d" fi