From 40fecdc2145135405f14f971492ba3ad1732a965 Mon Sep 17 00:00:00 2001 From: nahuhh <50635951+nahuhh@users.noreply.github.com> Date: Wed, 9 Oct 2024 20:39:41 +0000 Subject: [PATCH] untested macos --- bsx/setup.sh | 4 ++++ install.sh | 14 ++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/bsx/setup.sh b/bsx/setup.sh index 151d50f..558a59e 100755 --- a/bsx/setup.sh +++ b/bsx/setup.sh @@ -15,6 +15,10 @@ $SWAP_DATADIR/venv/bin/pip install . cd $SWAP_DATADIR git clone https://github.com/basicswap/basicswap cd $SWAP_DATADIR/basicswap +## Macos +if [[ $MACOS ]]; then + $SWAP_DATADIR/venv/bin/pip install certifi +fi ## Install basicswap $SWAP_DATADIR/venv/bin/pip install wheel $SWAP_DATADIR/venv/bin/pip install . diff --git a/install.sh b/install.sh index 74c2de3..3a4705a 100755 --- a/install.sh +++ b/install.sh @@ -63,9 +63,16 @@ detect_os_arch() { UPDATE="sudo pacman -Syu" DEPENDENCY="python-pipenv gnupg pkgconf base-devel" $green"\nDetected Arch Linux\n";$nocolor - elif type -P brew > /dev/null; then - # MacOS - INSTALL="brew install" + elif [[ $(uname -s) = "Darwin" ]]; then + # MacOS + export MACOS=1 + if type -P brew > /dev/null; then + $green"Homebrew is installed\n";$nc + INSTALL="brew install" + else + $green"Installing Homebrew\n";$nc + INSTALL="curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | /bin/bash && brew install" + fi DEPENDENCY="python gnupg pkg-config" $green"\nDetected MacOS\n";$nocolor else @@ -74,7 +81,6 @@ detect_os_arch() { fi } - detect_os_arch ## Update & Install dependencies