Files
rocm-systems/projects/rocr-runtime/RPM/preinst
T
systems-assistant[bot] d8cba83d42 Add 'projects/rocr-runtime/' from commit '72061a9024139fa0a99f73f9d3d4deb275670095'
git-subtree-dir: projects/rocr-runtime
git-subtree-mainline: ad0fb25ed5
git-subtree-split: 72061a9024
2025-07-22 22:52:49 +00:00

24 lines
757 B
Bash

#!/bin/bash
echo "Pre-install check for ROCr."
# Check for old installations...
if ls /usr/lib/libhsa-runtime* 1> /dev/null 2>&1; then
echo "An old version of libhsa-runtime was found in /usr/lib."
echo "This must be uninstalled before proceeding with the installation"
echo "to avoid potential incompatibilities."
read -r -p "Do you want to uninstall the old version? [y/N] " response
if [ "$response" = "y" ]; then
if ! rm -rf /usr/lib/libhsa-runtime*; then
echo "Failed to remove /usr/lib/libhsa-runtime* files."
echo "Try to uninstall these files manually."
exit 1
fi
echo "Old version uninstalled."
else
echo "The old and new versions of ROCm are incompatible. Installation aborted."
exit 1
fi
fi