02 - nvidia.sh aktualisiert
This commit is contained in:
@@ -4,10 +4,32 @@ if [ ! -d ~/nvidia ]; then
|
||||
# Make sure that i386 architecture is available
|
||||
dpkg --add-architecture i386
|
||||
# Set Nvidia Driver version
|
||||
NV_DRV_V="$(wget -qO- https://github.com/ich777/versions/raw/master/nvidia_versions | grep "CUR_PRB=" | cut -d '=' -f2)"
|
||||
apt-get update
|
||||
apt-get -y install linux-headers-$(uname -r) build-essential libglvnd-dev pkg-config
|
||||
apt-get -y install linux-headers-$(uname -r) build-essential libglvnd-dev pkg-config tidy
|
||||
mkdir -p ~/nvidia && cd ~/nvidia
|
||||
if [ -z "$1" ]; then
|
||||
NV_DRV_V="$(wget -qO- https://github.com/ich777/versions/raw/master/nvidia_versions | grep "CUR_PRB=" | cut -d '=' -f2)"
|
||||
else
|
||||
LAT_VERSIONS="$(wget -qO- https://www.nvidia.com/en-us/drivers/unix/ | tidy -quiet -wrap 4096 2>/dev/null | grep -A8 "Linux x86_64/AMD64/EM64T" | grep -e "Latest Production Branch" -e "Latest New Feature Branch" -e "Latest Beta Version")"
|
||||
if [ "$1" == "latest" ]; then
|
||||
NV_DRV_V="$(echo "$LAT_VERSIONS" | grep "Latest Production Branch" | cut -d '>' -f4 | cut -d '<' -f1)"
|
||||
elif [ "$1" == "nfb" ]; then
|
||||
NV_DRV_V="$(echo "$LAT_VERSIONS" | grep "Latest New Feature Branch" | cut -d '>' -f4 | cut -d '<' -f1)"
|
||||
elif [ "$1" == "beta" ]; then
|
||||
NV_DRV_V="$(echo "$LAT_VERSIONS" | grep "Latest Beta Version" | cut -d '>' -f4 | cut -d '<' -f1)"
|
||||
else
|
||||
echo "$1 is not a valid option, valid options are:"
|
||||
echo
|
||||
echo "latest = Latest Production branch"
|
||||
echo "nfb = Latest New Feature branch"
|
||||
echo "beta = Latest Beta branch"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
if [ -z "${NV_DRV_V}" ]; then
|
||||
echo "Error: Something went wrong while fetching driver version!"
|
||||
exit 1
|
||||
fi
|
||||
wget http://download.nvidia.com/XFree86/Linux-x86_64/${NV_DRV_V}/NVIDIA-Linux-x86_64-${NV_DRV_V}.run
|
||||
chmod +x NVIDIA-Linux-x86_64-${NV_DRV_V}.run
|
||||
echo "blacklist nouveau
|
||||
|
Reference in New Issue
Block a user