mirror of
https://abf.rosa.ru/djam/auto-krokodil.git
synced 2025-02-23 18:42:58 +00:00
allow to set custom repository
This commit is contained in:
parent
88b134cc9c
commit
5b57a6f843
1 changed files with 5 additions and 2 deletions
|
@ -13,6 +13,9 @@ readonly EXIT_ENODRIVER=10
|
|||
readonly EXIT_ENOGPU=20
|
||||
readonly EXIT_ENOCOMMONDRIVER=30
|
||||
|
||||
# add "--repofrompath xxx,local_repo" when running from inside Anaconda
|
||||
KROKO_DNF_OPTS="${KROKO_DNF_OPTS:-}"
|
||||
|
||||
KROKO_TMPDIR="${KROKO_TMPDIR:-$(mktemp -d)}"
|
||||
trap 'rm -fr "$KROKO_TMPDIR"' EXIT
|
||||
|
||||
|
@ -135,7 +138,7 @@ _filter_gpus(){
|
|||
# $1: arch (e.g. x86_64)
|
||||
# $2: path to file for output
|
||||
_dnf_mk_file(){
|
||||
dnf repoquery \
|
||||
dnf $KROKO_DNF_OPTS repoquery \
|
||||
--arch "$1" \
|
||||
--whatprovides 'nvidia-blob-*' \
|
||||
--qf 'NAME %{name}\n%{provides}' \
|
||||
|
@ -313,7 +316,7 @@ _cli_autoinstall(){
|
|||
local o
|
||||
o="$(_cli_best_driver)"
|
||||
# --allowerasing to delete e.g. nvidia510 if nvidia515 is being installed
|
||||
dnf -y --allowerasing install "$o"
|
||||
dnf $KROKO_DNF_OPTS -y --allowerasing install "$o"
|
||||
}
|
||||
|
||||
_main(){
|
||||
|
|
Loading…
Add table
Reference in a new issue