File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 1
- #! /bin/bash
1
+ #! /usr/bin/env bash
2
+
2
3
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
4
12
13
+ # Install brew if required
5
14
if [[ $( command -v brew) == " " ]]; then
15
+ echo " Installing Homebrew"
6
16
/bin/bash -c " $( curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh) "
17
+ echo " [ ] installed brew t=$SECONDS "
7
18
19
+ # make brew available now
8
20
if [[ $ARCH == " x86_64" ]]; then
9
21
echo ' eval "$(/usr/local/homebrew/bin/brew shellenv)"' >> $RC_FILE
10
22
eval " $( /usr/local/homebrew/bin/brew shellenv) "
You can’t perform that action at this time.
0 commit comments