Skip to content

Commit d192e75

Browse files
committed
Add Homebrew support for macOS installation
Implement Homebrew as a preferred installation method on macOS within the `select_archive_format` function. Detect if Homebrew is available and use it to install the binary, simplifying the process for users.
1 parent b0b43dc commit d192e75

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

install.sh

+11-1
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,18 @@ select_archive_format() {
5757
PLATFORM_ARCH=$1
5858

5959
case "$PLATFORM_ARCH" in
60+
darwin-*)
61+
# Check if Homebrew is installed
62+
if command -v brew >/dev/null 2>&1; then
63+
echo "Using Homebrew for installation."
64+
brew install "$BINARY_NAME" # Install using Homebrew
65+
exit 0 # Exit after installation
66+
else
67+
echo "zip" # We only ship .zip archives for macOS
68+
fi
69+
;;
6070
windows-*)
61-
echo "zip"
71+
echo "zip" # We only ship .zip archives for Windows
6272
;;
6373
*)
6474
if command -v tar >/dev/null 2>&1; then

0 commit comments

Comments
 (0)