-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·119 lines (98 loc) · 2.41 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
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#!/bin/bash
# Matt Revell Scripts v1.1
homebrew_packages=(
"git"
"tmux"
"vim"
"neovim"
"reattach-to-user-namespace"
)
homebrew_cask_apps=(
"google-chrome"
"docker"
)
function installHomebrew() {
echo "Installing Homebrew"
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
}
function installBrewCask() {
echo "Installing brew Cask"
/usr/local/bin/brew tap caskroom/cask
}
function makeBashDefaultShell() {
echo "Making bash the default shell"
chsh -s /bin/bash
}
function makeScreenshotsSaveToDownloads() {
echo "Configuring screenshots to save in Downloads"
defaults write com.apple.screencapture location ~/Downloads
killall SystemUIServer
}
function makeKeyboardRepeatRateFast() {
defaults write NSGlobalDomain KeyRepeat -int 1
defaults write NSGlobalDomain InitialKeyRepeat -int 10
}
function installApps() {
installHomebrewApps
installHomebrewCaskApps
installMacAppStoreApps
}
function installHomebrewApps() {
echo "Installing Homebrew packages"
for homebrew_package in "${homebrew_packages[@]}"; do
brew install "$homebrew_package"
done
}
function installHomebrewCaskApps() {
echo "Installing Homebrew cask apps"
for homebrew_cask_app in "${homebrew_cask_apps[@]}"; do
brew cask install "$homebrew_cask_app"
done
}
function installMacAppStoreApps() {
echo "Installing Mac App Store apps"
for mac_app_store_app in "${mac_app_store_apps[@]}"; do
mas install "$mac_app_store_app"
done
}
function manualInstalls() {
installNvm
installYarn
}
function installNvm() {
echo "Installing nvm"
rm -rf ~/.nvm
mkdir ~/.nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
}
function installYarn() {
echo "Intalling yarn"
curl -o- -L https://yarnpkg.com/install.sh | bash
}
function symlinkingDotFiles() {
echo "Symlinking dotfiles"
for file in $(find "$HOME/Developer/environment/dotfiles" -depth 1 -exec basename {} \;); do
ln -s "$HOME/Developer/environment/dotfiles/$file" "$HOME/$file"
done
}
function fixSierraSSHKeys() {
cat > ~/.ssh/config << EOL
Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_rsa
EOL
}
function activate() {
installHomebrew
installBrewCask
makeBashDefaultShell
makeScreenshotsSaveToDownloads
makeKeyboardRepeatRateFast
installApps
manualInstalls
symlinkingDotFiles
fixSierraSSHKeys
}
activate
echo "Done"