-
Notifications
You must be signed in to change notification settings - Fork 1
/
install_mac.sh
47 lines (37 loc) · 922 Bytes
/
install_mac.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
#!/bin/bash
BREWFILE_DIR=.
ask() {
printf "$* [y/n] "
local answer
read answer
case $answer in
"yes" ) return 0 ;;
"y" ) return 0 ;;
* ) return 1 ;;
esac
}
set -e
if ask 'xcode install?'; then
xcode-select --install
fi
if ask 'Homebrew install?'; then
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor
brew install caskroom/cask/brew-cask
fi
if ask 'execute brew bundle(Brewfile)?'; then
brew tap Homebrew/bundle
pushd $BREWFILE_DIR
brew bundle
popd
brew link openssl --force
fi
if ask 'setup finder?'; then
defaults write com.apple.finder AppleShowAllFiles TRUE
defaults write com.apple.finder _FXShowPosixPathInTitle -bool yes
defaults write -g NSNavPanelExpandedStateForSaveMode -bool yes
killall Finder
fi
if ask 'setup Mission Control?'; then
defaults write com.apple.dock mru-spaces -bool false
fi