Skip to content

Commit

Permalink
chore: add notices about homebrew-installed batt in installation script
Browse files Browse the repository at this point in the history
  • Loading branch information
charlie0129 committed Oct 8, 2024
1 parent 1cd6068 commit 030a640
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions hack/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,20 @@ info() {
echo -e "$(date +'%Y-%m-%d %H:%M:%S') \033[34m[INFO]\033[0m $*"
}

# If the full path to batt has Homebrew prefix ("/opt"), stop here.
if which batt 2>/dev/null | grep -q /opt; then
echo "You have batt installed via Homebrew. Please use Homebrew to upgrade batt:"
echo " - brew update"
echo " - sudo brew services stop batt"
echo " - brew upgrade batt"
echo " - sudo brew services start batt"
echo "If you want to use this script to install batt, please uninstall Homebrew-installed batt first by:"
echo " - sudo brew services stop batt"
echo " - brew uninstall batt"
echo " - sudo rm -rf /opt/homebrew/Cellar/batt"
exit 1
fi

launch_daemon="/Library/LaunchDaemons/cc.chlc.batt.plist"

# Uninstall old versions (if present)
Expand Down

0 comments on commit 030a640

Please sign in to comment.