forked from thoughtbot/laptop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
linux
executable file
·112 lines (83 loc) · 4.13 KB
/
linux
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
#!/usr/bin/env zsh
CLEAR="\033[0m"
ORANGE="\033[33m"
successfully() {
$* || (echo "failed" 1>&2 && exit 1)
}
fancy_echo() {
echo -e ${ORANGE}$1${CLEAR}
echo
}
if lsb_release -c | grep -qEv 'precise|quantal|wheezy|raring'
then
fancy_echo "Sorry! we don't currently support that distro."
exit 1;
fi
fancy_echo "Updating system packages ..."
if command -v aptitude >/dev/null; then
fancy_echo "Using aptitude ..."
else
fancy_echo "Installing aptitude ..."
successfully sudo apt-get install -y aptitude
fi
successfully sudo aptitude update
successfully sudo aptitude -y dist-upgrade
fancy_echo "Installing git, for source control management ..."
successfully sudo aptitude install -y git
fancy_echo "Installing base ruby build dependencies ..."
successfully sudo aptitude build-dep -y ruby1.9.3
fancy_echo "Installing libraries for common gem dependencies ..."
successfully sudo aptitude install -y libxslt1-dev libcurl4-openssl-dev libksba8 libksba-dev libqtwebkit-dev
fancy_echo "Installing Postgres, a good open source relational database ..."
successfully sudo aptitude install -y postgresql postgresql-server-dev-all
fancy_echo "Installing Redis, a good key-value database ..."
successfully sudo aptitude install -y redis-server
fancy_echo "Installing The Silver Searcher (better than ack or grep) to search the contents of files ..."
successfully git clone git:https://github.com/ggreer/the_silver_searcher.git /tmp/the_silver_searcher
successfully sudo aptitude install -y automake pkg-config libpcre3-dev zlib1g-dev
successfully sh /tmp/the_silver_searcher/build.sh
successfully cd /tmp/the_silver_searcher
successfully sh build.sh
successfully sudo make install
successfully cd ~
successfully rm -rf /tmp/the_silver_searcher
fancy_echo "Installing ctags, to index files for vim tab completion of methods, classes, variables ..."
successfully sudo aptitude install -y exuberant-ctags
fancy_echo "Installing vim ..."
successfully sudo aptitude install -y vim-gtk
fancy_echo "Installing tmux, to save project state and switch between projects ..."
successfully sudo aptitude install -y tmux
fancy_echo "Installing ImageMagick, to crop and resize images ..."
successfully sudo aptitude install -y imagemagick
fancy_echo "Installing watch, to execute a program periodically and show the output ..."
successfully sudo aptitude install -y watch
fancy_echo "Installing rbenv, to change Ruby versions ..."
successfully git clone git:https://github.com/sstephenson/rbenv.git ~/.rbenv
if ! grep -qs "rbenv init" ~/.zshrc; then
successfully echo 'export PATH="$HOME/bin:$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc
successfully echo 'eval "$(rbenv init -)"' >> ~/.zshrc
fi
source ~/.zshrc
fancy_echo "Installing rbenv-gem-rehash so the shell automatically picks up binaries after installing gems with binaries..."
successfully git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
fancy_echo "Installing ruby-build, to install Rubies ..."
successfully git clone git:https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
fancy_echo "Installing Ruby 1.9.3-p392 ..."
successfully rbenv install 1.9.3-p392
fancy_echo "Setting Ruby 1.9.3-p392 as global default Ruby ..."
successfully rbenv global 1.9.3-p392
successfully rbenv shell 1.9.3-p392
fancy_echo "Updating to latest Rubygems version ..."
successfully gem update --system
fancy_echo "Installing critical Ruby gems for Rails development ..."
successfully gem install bundler foreman pg rails thin --no-document
fancy_echo "Installing GitHub CLI client ..."
successfully gem install hub --no-document
fancy_echo "Installing Heroku CLI client ..."
successfully wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh
fancy_echo "Installing the heroku-config plugin to pull config variables locally to be used as ENV variables ..."
successfully heroku plugins:install git:https://github.com/ddollar/heroku-config.git
if ! grep -qs "DO NOT EDIT BELOW THIS LINE" ~/.zshrc; then
fancy_echo "Prepare ~/.zshrc for https://github.com/thoughtbot/dotfiles ..."
successfully echo "# DO NOT EDIT BELOW THIS LINE\n" >> ~/.zshrc
fi