-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell_setup
More file actions
executable file
·50 lines (40 loc) · 1.37 KB
/
Copy pathshell_setup
File metadata and controls
executable file
·50 lines (40 loc) · 1.37 KB
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
#!/usr/bin/env zsh
set -e
echo "🐚🐚🐚🐚🐚 Beginning shell setup 🐚🐚🐚🐚🐚\n"
if [ ! -x /Library/Developer/CommandLineTools ]
then
echo "Installing Command Line tools"
xcode-select --install
else
echo "Command Line tools ($(xcode-select --version)) already installed, skipping installation"
fi
install_homebrew() {
if [ ! -x /usr/local/bin/brew ]
then
echo "Installing Homebrew"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
else
echo "Homebrew already installed, checking for updates"
# git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
# git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow
brew update
fi
}
install_zsh() {
if [ -z "$ZSH" ]
then
echo "Installing oh-my-zsh"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
else
echo "ZSH already installed, skipping installation"
fi
}
install_homebrew
echo "Installing brew packages"
brew bundle
brew upgrade
echo "Attempting to install ZSH"
install_zsh
echo "----------------------------------------------------------------------"
echo "| 🕰 Now would be a good time to update ~/.zshrc and ~/.gitconfig 🕰 |"
echo "----------------------------------------------------------------------"