1
0
mirror of https://github.com/containers/ramalama.git synced 2026-02-05 15:47:26 +01:00
Files
ramalama/hack/rm.sh
Eric Curtin a07a7d34cc Attempt a pipx uninstall if pipx is available
So we can remove ramalama via various install techniques

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
2024-10-07 17:19:06 +01:00

22 lines
343 B
Bash
Executable File

#!/bin/bash
available() {
command -v "$1" >/dev/null
}
main() {
set -e -o pipefail
local rootdirs=("/opt/homebrew" "/usr/local" "/usr" "")
local rootdir
for rootdir in "${rootdirs[@]}"; do
rm -rf "$rootdir/bin/ramalama" "$rootdir/share/ramalama"
done
if available pipx; then
pipx uninstall ramalama
fi
}
main "$@"