Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f224342f5b | |||
| 4a999674cf |
@@ -10,7 +10,7 @@ steps:
|
||||
- name: clone-repo
|
||||
image: alpine/git:latest
|
||||
commands:
|
||||
- git clone https://gitea.akshun-lab.uk/akshun/python-script.git /artifacts
|
||||
- git clone https://gitea.akshun-lab.uk/akshun/python-setup.git /artifacts
|
||||
volumes:
|
||||
- name: artifacts
|
||||
path: /artifacts
|
||||
|
||||
13
setup.py
13
setup.py
@@ -35,6 +35,7 @@ def choices():
|
||||
|
||||
def menu():
|
||||
global menu2
|
||||
menu2.clear()
|
||||
choices_list = choices().splitlines()
|
||||
choices_list.append("Exit")
|
||||
menu1 = inquirer.select(
|
||||
@@ -88,16 +89,16 @@ def menu():
|
||||
|
||||
elif menu1 == "Drivers":
|
||||
vendors = ["NVIDIA", "AMD", "Intel", "Back to Main Menu"]
|
||||
menu2 = inquirer.select(
|
||||
selected_vendor = inquirer.select(
|
||||
message = "Select your GPU vendor",
|
||||
choices = vendors,
|
||||
default = None,
|
||||
multiselect = False
|
||||
).execute()
|
||||
if menu2 == "Back to Main Menu":
|
||||
if selected_vendor == "Back to Main Menu":
|
||||
menu()
|
||||
else:
|
||||
install_drivers(menu2)
|
||||
install_drivers(selected_vendor)
|
||||
|
||||
elif menu1 == "Enable RPM Fusion":
|
||||
enable_rpmfusion()
|
||||
@@ -260,7 +261,7 @@ def install_drivers(vendor):
|
||||
elif which("dnf") is not None or which("yum") is not None:
|
||||
os.system("sudo dnf install -y intel-media-driver")
|
||||
elif which("pacman") is not None:
|
||||
driver = ["intel-media-driver", "libva-intel-driver"]
|
||||
driver = ["intel-media-driver", "libva-intel-driver", "Back to Main Menu"]
|
||||
gpu = inquirer.select(
|
||||
message = "Choose driver",
|
||||
choices = driver,
|
||||
@@ -271,6 +272,8 @@ def install_drivers(vendor):
|
||||
os.system("sudo pacman -S --noconfirm intel-media-driver")
|
||||
elif gpu == "libva-intel-driver":
|
||||
os.system("sudo pacman -S --noconfirm libva-intel-driver")
|
||||
elif gpu == "Back to Main Menu":
|
||||
menu()
|
||||
elif vendor == "NVIDIA":
|
||||
if which("apt") is not None:
|
||||
os.system("sudo apt install -y nvidia-driver")
|
||||
@@ -278,7 +281,7 @@ def install_drivers(vendor):
|
||||
os.system("sudo dnf install -y akmod-nvidia")
|
||||
elif which("pacman") is not None:
|
||||
os.system("sudo pacman -S --noconfirm nvidia")
|
||||
|
||||
|
||||
menu()
|
||||
|
||||
def install_other():
|
||||
|
||||
Reference in New Issue
Block a user