0f79d51998
Check required of existence of dir in the prerm Change-Id: I54e1bc0309e82794b41fcc2ae1f01f004138dcee
29 lines
619 B
Bash
29 lines
619 B
Bash
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
rm_ldconfig() {
|
|
rm -f /etc/ld.so.conf.d/x86_64-rocm-opencl.conf && ldconfig
|
|
rm -f /etc/OpenCL/vendors/@OPENCL_AMD_ICD_FILE@
|
|
}
|
|
|
|
case "$1" in
|
|
purge)
|
|
;;
|
|
remove)
|
|
rm -f @ROCM_PATH@/lib/libOpenCL.so
|
|
rm -f @ROCM_PATH@/lib/libOpenCL.so.@OPENCL_LIB_VERSION_MAJOR@
|
|
rm -f @ROCM_PATH@/lib/libOpenCL.so.@OPENCL_LIB_VERSION_STRING@
|
|
if [ -e "@ROCM_PATH@" ] ; then
|
|
if [ -e "@ROCM_PATH@/lib" ] ; then
|
|
rmdir --ignore-fail-on-non-empty @ROCM_PATH@/lib
|
|
fi
|
|
rmdir --ignore-fail-on-non-empty @ROCM_PATH@
|
|
fi
|
|
rm_ldconfig
|
|
;;
|
|
*)
|
|
exit 0
|
|
;;
|
|
esac
|