Removed nvidia from clean install and added script for install nvidia driver.

This commit is contained in:
Ivan Jurišić 2023-12-06 12:08:00 +01:00
parent 523eb0b3cf
commit 158fce3a4a
3 changed files with 52 additions and 20 deletions

View File

@ -10,7 +10,6 @@ PKG_KDE_MINIMAL="kde-plasma-desktop plasma-nm"
PKG_KDE_APPS="ark kcalc okular gwenview krita dolphin-plugins kde-spectacle audacious dragonplayer kdenetwork-filesharing samba"
PKG_OFFICE="libreoffice-calc libreoffice-writer libreoffice-draw libreoffice-kf5 aspell-hr hunspell-hr"
PKG_NET="thunderbird net-tools remmina"
PKG_NVIDIA="nvidia-driver"
PKG_CHAT="element-desktop telegram-desktop"
PKG_KDE_PURGE="kdeconnect termit zutty"
@ -83,15 +82,6 @@ if choice 2>/dev/null; then
$APT_INST $PKG_FIREFOX $PKG_NET
fi
echo -ne "\nYou want to install NVIDIA Proprietary driver ($PKG_NVIDIA)? "
if choice 2>/dev/null; then
echo -ne "\nAdd support for i386 packages\n"
dpkg --add-architecture i386
$APT_UPDATE
echo -ne "\n$APT_INST $PKG_NVIDIA\n"
$APT_INST $PKG_NVIDIA
fi
echo -ne "\nYou want to install chat programs ($PKG_CHAT)? "
if choice 2>/dev/null; then
echo -ne "\nAdd repository for Element client\n"

View File

@ -11,7 +11,6 @@ PKG_INDI="package-update-indicator"
PKG_APPS="audacious vlc synaptic gnome-disk-utility gimp hardinfo"
PKG_OFFICE="libreoffice libreoffice-gtk3 aspell-hr hunspell-hr"
PKG_NET="network-manager-gnome thunderbird net-tools remmina"
PKG_NVIDIA="nvidia-driver"
PKG_CHAT="element-desktop telegram-desktop"
@ -81,15 +80,6 @@ if choice 2>/dev/null; then
$APT_INST $PKG_FIREFOX $PKG_NET
fi
echo -ne "\nYou want to install NVIDIA Proprietary driver ($PKG_NVIDIA)? "
if choice 2>/dev/null; then
echo -ne "\nAdd support for i386 packages\n"
dpkg --add-architecture i386
$APT_UPDATE
echo -ne "\n$APT_INST $PKG_NVIDIA\n"
$APT_INST $PKG_NVIDIA
fi
echo -ne "\nYou want to install chat programs ($PKG_CHAT)? "
if choice 2>/dev/null; then
echo -ne "\nAdd repository for Element client\n"

52
nvidia/nvidia-install.sh Executable file
View File

@ -0,0 +1,52 @@
#!/bin/bash
#### Variables
APT_UPDATE="apt -y update"
APT_INST="apt -y install"
APT_PURGE="apt -y purge"
APT_REMOVE="apt -y autoremove"
PKG_NVIDIA="nvidia-driver"
#### Functions
check_root() {
if [ "$EUID" -ne 0 ]; then
echo "Must be root to run $0"
exit
fi
}
choice() {
echo -ne "[y/n]"
while true
do
read -rN1 input
case $input in
[yY][eE][sS]|[yY])
return 0
break
;;
[nN][oO]|[nN])
return 1
;;
esac
done
}
#### Main
check_root
echo -e "\nUpdate apt"
echo "$APT_UPDATE"
$APT_UPDATE
echo -ne "\nYou want to install NVIDIA Proprietary driver ($PKG_NVIDIA)? "
if choice 2>/dev/null; then
echo -ne "\nAdd support for i386 packages\n"
dpkg --add-architecture i386
$APT_UPDATE
echo -ne "\n$APT_INST $PKG_NVIDIA\n"
$APT_INST $PKG_NVIDIA
fi