forked from thoughtbot/laptop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mac
executable file
·96 lines (68 loc) · 3.62 KB
/
mac
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
#!/usr/bin/env zsh
successfully() {
$* || (echo "failed" 1>&2 && exit 1)
}
echo "Checking for SSH key, generating one if it doesn't exist ..."
[[ -f ~/.ssh/id_rsa.pub ]] || ssh-keygen -t rsa
echo "Copying public key to clipboard. Paste it into your Github account ..."
[[ -f ~/.ssh/id_rsa.pub ]] && cat ~/.ssh/id_rsa.pub | pbcopy
successfully open https://github.com/account/ssh
echo "Fixing permissions ..."
successfully sudo mkdir -p /usr/local
successfully sudo chown -R `whoami` /usr/local
echo "Installing Homebrew, a good OS X package manager ..."
successfully ruby <(curl -fsS https://raw.github.com/mxcl/homebrew/go)
successfully brew update
echo "Installing zsh, a good shell ..."
successfully brew install zsh
echo "Installing direnv, a good way to manage your path ..."
successfully brew install direnv
echo "Creat Launch Agent directory for auto start of services"
mkdir -p ~/Library/LaunchAgents
echo "Putting Homebrew location earlier in PATH and adding ruby gem bin ..."
successfully echo "
# recommended by brew doctor
export PATH='/usr/local/bin:$(cd $(which gem)/..;pwd):$PATH'" >> ~/.zshenv
successfully source ~/.zshenv
echo "Installing system libraries recommended for Ruby"
successfully brew install gdbm libffi libksba libyaml
echo "Installing Postgres, a good open source relational database ..."
successfully brew install postgres --no-python
successfully initdb /usr/local/var/postgres -E utf8
successfully ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
echo "Installing Memcached, a good open source memory store (for caching)"
successfully brew install memcached
successfully ln -sfv /usr/local/opt/memcached/*.plist ~/Library/LaunchAgents
echo "Installing Redis, a good key-value database ..."
successfully brew install redis
successfully ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
echo "Installing The Silver Searcher (better than ack or grep) for searching the contents of files ..."
successfully brew install the_silver_searcher
echo "Installing ctags, for indexing files for vim tab completion of methods, classes, variables ..."
successfully brew install ctags
echo "Installing tmux, for saving project state and switching between projects ..."
successfully brew install tmux
echo "Installing reattach-to-user-namespace, for copy-paste and RubyMotion compatibility with tmux ..."
successfully brew install reattach-to-user-namespace
echo "Installing ImageMagick, for cropping and re-sizing images ..."
successfully brew install imagemagick
echo "Installing QT, used by Capybara Webkit for headless Javascript integration testing ..."
successfully brew install qt
echo "Installing watch, used to execute a program periodically and show the output ..."
successfully brew install watch
echo "Installing hombrew/versions for installing old versions of packages"
successfully brew tap homebrew/versions
echo "Installing Ruby 2.0.0, which will be the default ..."
successfully brew install ruby
echo "Update to latest Rubygems version ..."
successfully gem update --system
echo "Installing critical Ruby gems for Rails development ..."
successfully gem install bundler foreman pg rails --no-ri --no-rdoc -f
echo "Installing GitHub CLI client ..."
successfully gem install hub --no-ri --no-rdoc
echo "Installing Heroku CLI client ..."
successfully brew install heroku-toolbelt
echo "Installing the heroku-config plugin for pulling config variables locally to be used as ENV variables ..."
successfully heroku plugins:install git://github.com/ddollar/heroku-config.git
echo "Your shell will now restart in order for changes to apply."
exec $SHELL -l