Files
rocm-systems/rocm-core.prerm
T
Ashutosh Mishra 68c763f3d0 Inital commit of the new lib package
Signed-off-by: Ashutosh Mishra <ashutosh.mishra@amd.com>
Change-Id: I605c3fb56584806dc6b392230e64d304449819f6
2022-11-29 00:25:06 -05:00

26 lines
667 B
Bash
Executable File

#!/bin/bash
do_update_alternatives(){
# skip update if program doesn't exist
command -v update-alternatives >/dev/null || return 0
# Update the /opt/rocm symlink
update-alternatives --remove "rocm" "@CPACK_PACKAGING_INSTALL_PREFIX@"
update-alternatives --remove "rocmod@ROCM_VERSION@" "@CPACK_PACKAGING_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/rocmmod"|| true
}
if [ -e /etc/lsb-release ] && source /etc/lsb-release && [ "$DISTRIB_ID" = "Ubuntu" ]
then
case "$1" in
(remove | upgrade)
do_update_alternatives
;;
(purge)
;;
(*)
exit 0
;;
esac
else
do_update_alternatives
fi