From 8b642f4935ea9790fba5cec8369c6698fd476e33 Mon Sep 17 00:00:00 2001 From: "Ward Nakchbandi (Cosmic Fusion)" Date: Thu, 29 Jun 2023 23:30:10 +0300 Subject: [PATCH] add driver modifier overrides --- data/modify-driver.sh | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/data/modify-driver.sh b/data/modify-driver.sh index b9d08b8..4ec4dda 100755 --- a/data/modify-driver.sh +++ b/data/modify-driver.sh @@ -1,8 +1,43 @@ #! /bin/bash +if [[ -z $pkg ]] && [[ "$1" = "xone-dkms" ]] +then + pkg="xone-dkms xpadneo-dkms xpad-noone-dkms" +fi + +if [[ -z $pkg ]] && [[ "$1" = "vulkan-amdgpu-pro" ]] +then + pkg="vulkan-amdgpu-pro vulkan-amdgpu-pro:i386" +fi + +if [[ -z $pkg ]] && [[ "$1" = "amf-amdgpu-pro" ]] +then + pkg="amf-amdgpu-pro vulkan-amdgpu-pro vulkan-amdgpu-pro:i386" +fi + +if [[ -z $pkg ]] && [[ "$1" = "amdvlk" ]] +then + pkg="amdvlk amdvlk:i386" +fi + +if [[ -z $pkg ]] && [[ "$1" = "opencl-legacy-amdgpu-pro-icd" ]] +then + pkg="ocl-icd-libopencl1-amdgpu-pro ocl-icd-libopencl1-amdgpu-pro:i386 opencl-legacy-amdgpu-pro-icd opencl-legacy-amdgpu-pro-icd:i386" +fi + +if [[ -z $pkg ]] && [[ "$1" = "amdgpu-pro-oglp" ]] +then + pkg="amdgpu-pro-oglp amdgpu-pro-oglp:i386" +fi + +if [[ -z $pkg ]] +then + pkg="$1" +fi + if dpkg -s "$1" then - pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY bash -c "apt remove $1 -y && sudo apt autoremove -y" + pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY bash -c "apt remove $pkg -y && sudo apt autoremove -y" else - pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY bash -c "apt update -y && apt install $1 -y" + pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY bash -c "apt update -y && apt install $pkg -y" fi