#!/bin/bash

set -e

rm_ldconfig() {
  rm -f /etc/ld.so.conf.d/x86_64-rocm-opencl.conf && ldconfig
  rm -f /etc/OpenCL/vendors/amdocl64.icd
}

case "$1" in
  purge)
  ;;
  remove)
    rm_ldconfig
  ;;
  *)
    exit 0
  ;;
esac
