forked from thoughtbot/laptop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mac
executable file
·56 lines (41 loc) · 1.96 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
#!/usr/bin/env bash
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
open https://github.com/account/ssh
echo "Installing Homebrew, a good OS X package manager ..."
/usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
brew update
echo "Put Homebrew location earlier in PATH ..."
echo "
# recommended by brew doctor
export PATH='/usr/local/bin:$PATH'" >> ~/.zshrc
source ~/.zshrc
echo "Installing memcached and mysql..."
brew install memcached mysql
echo "Installing Postgres, a good open source relational database ..."
brew install postgres
echo "Initialize mysql and postgres databases..."
initdb /usr/local/var/postgres
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
echo "Installing Redis, a good key-value database ..."
brew install redis
echo "Installing ack, a good way to search through files ..."
brew install ack
echo "Installing tmux, a good way to save project state and switch between projects ..."
brew install tmux
echo "Installing ImageMagick, good for cropping and re-sizing images ..."
brew install imagemagick
echo "Installing QT, used by Capybara Webkit for headless Javascript integration testing ..."
brew install qt
echo "Installing rbenv ..."
brew update
brew install rbenv ruby-build
# adding rbenv to path for acces to command-line util stuff
echo 'export PATH="$HOME/ .rbenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
source ~/.zshrc
# execute script for installing ruby and heroku dependencies
bash < <(curl -s https://raw.github.com/thoughtbot/laptop/master/ruby)
bash < <(curl -s https://raw.github.com/thoughtbot/laptop/master/heroku)