added potential amd installer

This commit is contained in:
Martin Donnelly 2020-02-10 11:10:39 +00:00
parent 5913b7b848
commit d7117f8f4a

View File

@ -1,4 +1,4 @@
#!/bin/bash
!/bin/bash
NVM="$HOME/.nvm"
NVM_VERSION="v0.35.2"
NODE_VERSION="--lts"
@ -13,12 +13,13 @@ UPDATE=no
DATABASE=no
NGINX=no
INSTALL=no
INSTALLAMD=no
DONVM=no
RED=`tput setaf 1`
GREEN=`tput setaf 2`
YELLOW=`tput setaf 3`
PURPLE=`tput setaf 5`
GREEN=`tput setaf 10`
YELLOW=`tput setaf 11`
PURPLE=`tput setaf 13`
RESET=`tput sgr0`
@ -52,6 +53,11 @@ case $i in
# DATABASE=YES
shift # past argument=value
;;
--install-amd)
UPDATE=YES
INSTALLAMD=YES
shift # past argument=value
;;
--default)
DEFAULT=YES
shift # past argument with no value
@ -150,3 +156,29 @@ if [[ $INSTALL = "YES" ]]; then
npm install -g gulp pm2@latest npm-check npm-install-missing
pm2 update
fi
if [[ $INSTALLAMD = "YES" ]]; then
fancy_echo "${YELLOW}Installing AMD...${RESET}"
# from https://askubuntu.com/questions/1066105/how-to-install-amd-graphic-drivers-on-ubuntu-18-04
# Ensures NVIDIA is removed
echo $sudoPW | sudo -S apt-add-repository -r ppa:graphics-drivers/ppa --yes && \
sudo -S apt update --assume-yes && \
sudo -S apt upgrade --assume-yes && \
sudo -S apt autoremove --assume-yes && \
sudo -S apt autoclean --assume-yes
# install amd non propritery
echo $sudoPW | sudo -S add-apt-repository ppa:oibaf/graphics-drivers --yes --enable-source
echo $sudoPW | sudo -S apt-get update --assume-yes
echo $sudoPW | sudo -S apt upgrade --assume-yes
echo $sudoPW | sudo -S dpkg --configure -a
echo $sudoPW | sudo -S dpkg-reconfigure lightdm
echo $sudoPW | sudo -S apt-get install mesa-vdpau-drivers
fi