pika-amdgpu-switcher/pika-amdgpu-core/usr/share/dpkg/scripts/amdgpu-firmware-hook.sh

25 lines
363 B
Bash
Raw Normal View History

2023-04-10 11:34:37 +02:00
#! /bin/bash
if [[ $1 == pre ]]
then
if grep -q amdgpu-dkms-firmware
then
mkdir -p /var/lib/apt/hooks
touch /var/lib/apt/hooks/amdgpu-dkms-firmware
else
exit 0
fi
fi
if [[ $1 == post ]]
then
if [[ -f /var/lib/apt/hooks/amdgpu-dkms-firmware ]]
then
amdgpu-firmware-refresh
rm -rf /var/lib/apt/hooks/amdgpu-dkms-firmware
else
exit 0
fi
fi