2023-06-29 22:18:36 +02:00
|
|
|
#! /bin/bash
|
|
|
|
|
2023-06-29 22:30:10 +02:00
|
|
|
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
|
|
|
|
|
2023-06-29 22:18:36 +02:00
|
|
|
if dpkg -s "$1"
|
|
|
|
then
|
2023-06-29 22:30:10 +02:00
|
|
|
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY bash -c "apt remove $pkg -y && sudo apt autoremove -y"
|
2023-06-29 22:18:36 +02:00
|
|
|
else
|
2023-06-29 22:30:10 +02:00
|
|
|
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY bash -c "apt update -y && apt install $pkg -y"
|
2023-06-29 22:18:36 +02:00
|
|
|
fi
|