Skip to content

Commit

Permalink
Attempt a pipx uninstall if pipx is available
Browse files Browse the repository at this point in the history
So we can remove ramalama via various install techniques

Signed-off-by: Eric Curtin <[email protected]>
  • Loading branch information
ericcurtin committed Oct 7, 2024
1 parent a51990a commit a07a7d3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions hack/rm.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
#!/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 "$@"
Expand Down

0 comments on commit a07a7d3

Please sign in to comment.