-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.sh
executable file
·54 lines (42 loc) · 1.3 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env zsh
COLORED='\033[0;32m'
NC='\033[0m'
echo "\n"
echo "\033[0;36m| Dev install script by Pataar | "
echo "\033[0;36m| Running on $(whoami)@$(hostname) | "
echo "\n"
if [ "$(uname)" == "Darwin" ]; then
echo "${COLORED}Setting up the Mac for $(whoami)...${NC}"
# Check for Homebrew and install if we don't have it
if test ! $(which brew); then
echo "${COLORED}Installing brew...${NC}"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
# Handle Mac platforms
CPU=$(uname -p)
if [[ "$CPU" == "arm" ]]; then
export PATH="/opt/homebrew/bin:$PATH"
export EDITOR=/opt/homebrew/bin/nano
alias nano=/opt/homebrew/bin/nano
alias oldbrew=/usr/local/bin/brew
else
export PATH="/usr/local/bin:$PATH"
export EDITOR=/usr/local/bin/nano
alias nano=/usr/local/bin/nano
fi
# Update Homebrew recipes
brew update
brew install zsh
# Install all our dependencies with bundle (See Brewfile)
brew tap homebrew/bundle
echo "${COLORED}Updating brew bundle...${NC}"
brew bundle --file=./brew/Brewfile
xcode-select --install
fi
# Make ZSH the default shell environment
if test $(which zsh); then
echo "${COLORED}Changing shell to zsh...${NC}"
chsh -s $(which zsh)
fi
zsh ./zsh_install.sh
bash ./bootstrap.sh