From 12f3bb20121edf6bce0b2e04ec7bf877e9741c4a Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 29 May 2025 17:44:39 +0100 Subject: [PATCH] make setup.sh to work on macos --- scripts/setup.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/scripts/setup.sh b/scripts/setup.sh index 8ae7036..048c563 100644 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -1,3 +1,20 @@ #! /bin/bash -apt-get install portaudio19-dev wget -y +# Detect the operating system +if [[ "$OSTYPE" == "darwin"* ]]; then + # macOS + echo "Detected macOS, using Homebrew for installation" + + # Check if Homebrew is installed + if ! command -v brew &> /dev/null; then + echo "Homebrew not found. Please install Homebrew first: https://brew.sh/" + exit 1 + fi + + # Install packages using Homebrew + brew install portaudio wget +else + # Linux (Debian/Ubuntu) + echo "Detected Linux, using apt-get for installation" + apt-get install portaudio19-dev wget -y +fi