blob: b899169ebd2ea4f61ce8464b7e918811a4a47e30 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#!/bin/sh
pushd $PWD
slpkg --repository="sbo" -d nvidia-kernel
slpkg --repository="sbo" -d nvidia-driver
cd /tmp/slpkg/nvidia-kernel
kernelver=$(ls /boot | grep "vmlinuz-generic-" | sort | tail -1 | cut -d '-' -f 3)
if [[ $kernel == "" ]]; then
kernel=$(ls /boot | grep "vmlinuz-[0-9]" | sort | tail -1 | cut -d '-' -f 2)
fi
chmod +x ./nvidia-kernel.SlackBuild
KERNEL=$kernelver ./nvidia-kernel.SlackBuild
cd /tmp/slpkg/nvidia-driver
chmod +x ./nvidia-driver.SlackBuild
COMPAT32="yes" ./nvidia-driver.SlackBuild
upgradepkg --install-new /tmp/nvidia-kernel*
upgradepkg --install-new /tmp/nvidia-driver*
touch /etc/modprobe.d/BLACKLIST-nouveau.conf
echo "blacklist nouveau" >> /etc/modprobe.d/BLACKLIST-nouveau.conf
echo "/usr/bin/nvidia-modprobe -c 0 -u" >> /etc/rc.d/rc.local
popd
|