mirror of
https://abf.rosa.ru/djam/auto-krokodil.git
synced 2025-02-24 02:52:59 +00:00

keleg@ noted that otherwise it may download and process dnf metadata and only then dnf will say that it is unable to install packages
24 lines
897 B
Bash
Executable file
24 lines
897 B
Bash
Executable file
#!/bin/bash
|
|
set -e
|
|
SOURCING=1
|
|
. kroko-cli.sh
|
|
test "$(echo 'line_from_lspci;0000;NVIDIA 1;nvidia470-core,nvidia510-core;nvidia510-core
|
|
line_from_lspci;0000;NVIDIA 2;nvidia390-core,nvidia470-core;nvidia470-core,
|
|
line_from_lspci;0000;NVIDIA 3;nvidia470-core,nvidia510-core,nvidia515-core;nvidia515-core' | _select_best_driver)" = nvidia470-core
|
|
test "$(echo 'line_from_lspci;0000;NVIDIA 1;nvidia390-core;nvidia390-core' | _select_best_driver)" = nvidia390-core
|
|
|
|
set +e
|
|
|
|
echo 'line_from_lspci;0000;NVIDIA 1;nvidia510-core,nvidia515-core;nvidia515-core
|
|
line_from_lspci;0000;NVIDIA 2;nvidia390-core,nvidia470-core;nvidia470-core,
|
|
line_from_lspci;0000;NVIDIA 3;nvidia340-core;nvidia340-core' | _select_best_driver 2>/dev/null
|
|
test $? = $EXIT_ENOCOMMONDRIVER || exit 1
|
|
|
|
_check_root 2>/dev/null
|
|
rc=$?
|
|
[ "$EUID" = 0 ] && [ "$rc" = 0 ]
|
|
[ "$EUID" != 0 ] && [ "$rc" = $EXIT_ENOPERM ]
|
|
|
|
set -e
|
|
|
|
echo FINISHED OK
|