68c763f3d0
Signed-off-by: Ashutosh Mishra <ashutosh.mishra@amd.com> Change-Id: I605c3fb56584806dc6b392230e64d304449819f6
26 lines
667 B
Bash
Executable File
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
|