-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmac-bootstrap
executable file
·73 lines (53 loc) · 1.98 KB
/
mac-bootstrap
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
#!/bin/bash
# Install expected packages on Mac and configure preferences/services
# TODO: Provide a top-level invocation script to clone the repository that this script is in and then run this script
# TODO: Suppress warning/error output
# TODO: Improve progress output from bundle (-v should do it)
# TODO: Provide a dry-run option
# Make sure homebrew is installed
if ! command -v brew >/dev/null; then
echo "Installing Homebrew ..."
curl -fsS \
'https://raw.githubusercontent.com/Homebrew/install/master/install' | ruby
else
echo "Homebrew already installed. Skipping ..."
fi
# Make sure everything's up to date
echo "Updating brew formulae..."
brew update
# Make sure homebrew bundle command is tapped and available
brew tap Homebrew/bundle
# Get all of our taps, formulae, and casks installed
# Make sure we can handle casks
brew tap 'caskroom/versions'
brew install 'caskroom/cask/brew-cask'
for BREWFILE in `find ./mac -name \*.Brewfile`
do
[ -f "$BREWFILE" ] && echo "Bundling $BREWFILE..." && brew bundle --file="$BREWFILE"
# TODO: Look for a corresponding foo.sh to run after each foo.Brewfile
done
echo Done brewing.
# Upgrade any other things the user might have installed with brew between runs of this script
brew upgrade
## TODO: Move commented post-processing steps below into appropriate mac/foo.sh files!
# 18F post-processing
# Start up services often needed by developers
# Really this should be handled via Docker and Kitematic in order to handle versioning
# in dev the same way it's handled in qa/stg/prod
#
# echo 'Restarting postgres...'
# brew services restart postgresql
# echo 'Restarting mysql...'
# brew services restart mysql
# sleep 2
# mysql.server start
# echo 'Restarting redis...'
# brew services restart redis
# There's more setup to do around rvm, etc. per the 18F/laptop script
# TODO
# get git-crypt setup so that ssh/gpg keys are decrypted
# TODO
# Get github access set up
if [ ! -f "$HOME/.ssh/github_rsa.pub" ]; then
open ~/Applications/GitHub.app
fi