diff --git a/debian/clean-install-kde.sh b/debian/clean-install-kde.sh index 3cb14fc..feac46d 100755 --- a/debian/clean-install-kde.sh +++ b/debian/clean-install-kde.sh @@ -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" diff --git a/debian/clean-install-mate.sh b/debian/clean-install-mate.sh index 40f5aca..573a829 100755 --- a/debian/clean-install-mate.sh +++ b/debian/clean-install-mate.sh @@ -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" diff --git a/nvidia/nvidia-install.sh b/nvidia/nvidia-install.sh new file mode 100755 index 0000000..dca8175 --- /dev/null +++ b/nvidia/nvidia-install.sh @@ -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