Skip to content

Commit ee221fd

Browse files
fix mac
1 parent 52360ab commit ee221fd

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

scripts/macos_dependencies.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
2+
23
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
3-
ROOT=$DIR/../
4+
ROOT="$(cd $DIR/../ && pwd)"
5+
ARCH=$(uname -m)
6+
7+
if [[ $SHELL == "/bin/zsh" ]]; then
8+
RC_FILE="$HOME/.zshrc"
9+
elif [[ $SHELL == "/bin/bash" ]]; then
10+
RC_FILE="$HOME/.bash_profile"
11+
fi
412

13+
# Install brew if required
514
if [[ $(command -v brew) == "" ]]; then
15+
echo "Installing Homebrew"
616
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
17+
echo "[ ] installed brew t=$SECONDS"
718

19+
# make brew available now
820
if [[ $ARCH == "x86_64" ]]; then
921
echo 'eval "$(/usr/local/homebrew/bin/brew shellenv)"' >> $RC_FILE
1022
eval "$(/usr/local/homebrew/bin/brew shellenv)"

0 commit comments

Comments
 (0)