18 lines
852 B
Bash
Executable File
18 lines
852 B
Bash
Executable File
#!/bin/bash
|
|
# Removes opencode Browser from this Mac:
|
|
# sudo "/Library/Application Support/opencode-browser/uninstall"
|
|
# The extension itself is removed from chrome://extensions.
|
|
APP="/Library/Application Support/opencode-browser"
|
|
if [ "$(id -u)" != 0 ]; then
|
|
echo "Run with sudo."
|
|
exit 1
|
|
fi
|
|
USER_NAME="${SUDO_USER:-$(stat -f%Su /dev/console)}"
|
|
USER_HOME="$(dscl . -read "/Users/$USER_NAME" NFSHomeDirectory | awk '{print $2}')"
|
|
sudo -u "$USER_NAME" HOME="$USER_HOME" "$APP/bin/node" "$APP/user-setup.mjs" uninstall "$APP"
|
|
rm -f /Library/Google/Chrome/NativeMessagingHosts/com.opencode.browser.json
|
|
rm -rf "$APP"
|
|
pkgutil --forget com.opencode.browser >/dev/null 2>&1
|
|
pkgutil --forget com.opencode.browser.llama >/dev/null 2>&1
|
|
echo "Removed. Remove the extension in chrome://extensions. The llama.cpp provider (if added) stays in opencode.json."
|