-
Notifications
You must be signed in to change notification settings - Fork 2
/
mac_setup.sh
executable file
·81 lines (67 loc) · 2.23 KB
/
mac_setup.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
echo "Running Software Update"
sudo softwareupdate --install --all --force
if xcode-select --print-path; then
echo "XCode already installed"
else
echo "Installing XCode..."
xcode-select --install
fi
# Install oh-my-zsh
if test -d ~/.oh-my-zsh; then
echo "Oh My Zsh already installed"
else
echo "Installing Oh My Zsh..."
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
fi
# Install Homebrew
if test -f /opt/homebrew/bin/brew; then
echo "Homebrew already installed"
else
echo "Installing Homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
# Install rust
if test -f ~/.cargo/bin/rustc; then
echo "rust already installed"
else
echo "Installing rust..."
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
fi
echo "Updating Mac preferences..."
# Adjust settings for key press repeating
defaults write -g ApplePressAndHoldEnabled -bool false
defaults write NSGlobalDomain KeyRepeat -int 2
defaults write NSGlobalDomain InitialKeyRepeat -int 15
# Hide Dock by default
defaults write com.apple.dock "autohide" -bool "true"
# Disable shadow in screenshots
defaults write com.apple.screencapture "disable-shadow" -bool "false"
echo "Installing Homebrew packages..."
brew install coreutils gh openssl jq readline wget tree nodejs libpq rbenv
brew install --cask iterm2
brew install --cask launchbar
brew install --cask google-chrome
brew install --cask soulver
brew install --cask spotify
brew install --cask 1password
brew install --cask notion
brew install --cask sizeup
brew install --cask zoom
brew install --cask slack
brew install --cask visual-studio-code
brew install --cask microsoft-excel
brew install --cask microsoft-word
brew install --cask keybase
brew install --cask signal
brew install --cask reflect
echo "Installing Mac App Store and packages..."
brew install mas # Mac App Store
mas install 1091189122 # Bear
if test -f /usr/local/bin/docker; then
echo "Docker already installed"
else
echo "Downloading Docker installer to ~/Downloads"
wget "https://desktop.docker.com/mac/main/arm64/Docker.dmg" ~/Downloads/Docker.dmg
echo "Done. Open ~/Downloads/Docker.dmg to install"
fi