shellcheck (rm not used variable and silent odd warnings)

This commit is contained in:
Mikhail Novosyolov 2022-10-27 23:41:01 +03:00
parent 53f9579aa4
commit c21bf85470

View file

@ -166,6 +166,7 @@ _filter_gpus(){
# $1: arch (e.g. x86_64)
# $2: path to file for output
_dnf_mk_file(){
# shellcheck disable=SC2086
dnf $KROKO_DNF_OPTS repoquery \
--quiet \
--arch "$1" \
@ -333,7 +334,6 @@ _select_best_driver(){
_cli_best_driver(){
set -e
local rc
local o
# Here $EXIT_* is returned if somethung goes wrong
o="$(_cli_get_gpus)"
@ -346,6 +346,7 @@ _cli_autoinstall(){
o="$(_cli_best_driver)"
local dnfcmd
dnfcmd="$(_mktemp)"
# shellcheck disable=SC2129
# plan upgrades to ensure system consistency and avoid trying to install
# nvidia modules for kernels which have already been removed from repos
echo "upgrade" >> "$dnfcmd"
@ -361,6 +362,7 @@ _cli_autoinstall(){
# --allowerasing to delete e.g. nvidia510 if nvidia515 is being installed
# Kernels for which binary nvidia modules do not exist will be removed
# XXX Is it good...?
# shellcheck disable=SC2086
dnf $KROKO_DNF_OPTS -y --allowerasing shell "$dnfcmd"
}