Skip to content

Commit

Permalink
Merge pull request #94 from alexarnoldy/update-nvidia-driver-script
Browse files Browse the repository at this point in the history
Added  '| grep "Basesystem"' to ensure only one software repo is returned for local variable in the _resolve_kernel_version function
  • Loading branch information
cdesiniotis authored Aug 22, 2024
2 parents a9ebe88 + 992cab6 commit 16d0583
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sle15/nvidia-driver
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ _resolve_kernel_version() {
fi
local version_without_flavor=$(echo ${KERNEL_VERSION} | cut -d- -f-2)
local version=$(zypper -x se -s -t package --match-exact "kernel-devel$package_flavor" |
grep "solvable "| grep $version_without_flavor | sed -e 's/.*edition="\([^"]*\).*/\1/g;s/\(.*\)\..*/\1/')
grep "solvable "| grep $version_without_flavor | grep "Basesystem" | sed -e 's/.*edition="\([^"]*\).*/\1/g;s/\(.*\)\..*/\1/')

if [ -z "${version}" ]; then
echo "Could not resolve Linux kernel version" >&2
Expand Down

0 comments on commit 16d0583

Please sign in to comment.