Update main.sh

This commit is contained in:
Ward Nakchbandi (Cosmic Fusion) 2024-01-28 20:46:46 +03:00 committed by GitHub
parent 1b74798f26
commit 41475bcf39
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,6 +3,12 @@ DRIVER=535
echo 'Package: *' > /etc/apt/preferences.d/0-a echo 'Package: *' > /etc/apt/preferences.d/0-a
echo 'Pin: release c=main' >> /etc/apt/preferences.d/0-a echo 'Pin: release c=main' >> /etc/apt/preferences.d/0-a
echo 'Pin-Priority: 400' >> /etc/apt/preferences.d/0-a
echo 'Package: *' >> /etc/apt/preferences.d/0-a
echo 'Pin: release c=external' >> /etc/apt/preferences.d/0-a
echo 'Pin-Priority: 390' >> /etc/apt/preferences.d/0-a
echo 'Package: *' >> /etc/apt/preferences.d/0-a
echo 'Pin: release c=ubuntu' >> /etc/apt/preferences.d/0-a
echo 'Pin-Priority: 390' >> /etc/apt/preferences.d/0-a echo 'Pin-Priority: 390' >> /etc/apt/preferences.d/0-a
apt update -y apt update -y
echo "$(apt show nvidia-driver-$DRIVER 2>&1 | grep -v "does not have a stable" | grep Version: | head -n1 | cut -f2 -d":" | cut -f1,2,3 -d"." | cut -f1 -d"-" | tr -d ' ')" > ./linux-nvidia-modules/DRIVER echo "$(apt show nvidia-driver-$DRIVER 2>&1 | grep -v "does not have a stable" | grep Version: | head -n1 | cut -f2 -d":" | cut -f1,2,3 -d"." | cut -f1 -d"-" | tr -d ' ')" > ./linux-nvidia-modules/DRIVER