pika-amdgpu-switcher/pika-amdgpu-core/usr/share/dpkg/scripts/amdgpu-firmware-hook.sh
2023-04-10 12:34:37 +03:00

25 lines
363 B
Bash
Executable File

#! /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