From bc1b8db2c698abc993c3b249d60e52391ef51030 Mon Sep 17 00:00:00 2001 From: "Ward Nakchbandi (Cosmic Fusion)" Date: Thu, 29 Jun 2023 23:05:43 +0300 Subject: [PATCH] add xbox and amdgpu driver definintions --- data/generate_driver_definitions.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/data/generate_driver_definitions.sh b/data/generate_driver_definitions.sh index 6695248..809840e 100755 --- a/data/generate_driver_definitions.sh +++ b/data/generate_driver_definitions.sh @@ -1,14 +1,28 @@ #! /bin/bash +### Get traditional ubuntu-driver list UBUNTU_DRIVERS="$(ubuntu-drivers list | grep -vi -server)" +### Check if the amdgpu module is loaded +### advanced micro devices graphics cards with "radeon" module only do not support the additional drivers if inxi -G | grep " loaded" | grep "amdgpu" &> /dev/null then - AMDGPU_DRIVERS="explosives" + AMDGPU_DRIVERS="$(echo -e "rocm-compute-runtime\nvulkan-amdgpu-pro\namf-amdgpu-pro\namdvlk\nopencl-legacy-amdgpu-pro-icd\namdgpu-pro-oglp")" fi -DRIVERS="$(printf "$UBUNTU_DRIVERS\n$AMDGPU_DRIVERS")" + +### Check for xbox equipment +if lsusb | grep -i xbox &> /dev/null +then + XONE_DRIVERS="$(echo -e "xbox-controller-drivers")" +fi + +### Merge all drivers together +DRIVERS="$(printf "$UBUNTU_DRIVERS\n$AMDGPU_DRIVERS\n$XONE_DRIVERS")" + +### If no drivers were found set them to random hash to trigger no drivers needed dialog in gui app if [[ -z $DRIVERS ]] then DRIVERS=emScuM8rsa6kuhMePtR5bT8s4z9s fi +### Print result echo $DRIVERS | tr " " "\n"