forked from thoughtbot/laptop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
linux
290 lines (222 loc) · 8.9 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
#!/usr/bin/env bash
### end common-components/bash-shebang
# Welcome to the thoughtbot laptop script! Be prepared to turn your laptop (or
# desktop, no haters here) into an awesome development machine.
# This file is auto-generated. Do not edit it by hand unless you know what
# you're doing. Please see 'CONTRIBUTING.md' for more information.
### end common-components/header
trap 'ret=$?; test $ret -ne 0 && printf "failed\n\n" >&2; exit $ret' EXIT
set -e
### end common-components/exit-trap
if [[ ! -d "$HOME/.bin/" ]]; then
mkdir "$HOME/.bin"
fi
if [ ! -f "$HOME/.zshrc" ]; then
touch $HOME/.zshrc
fi
if [[ ":$PATH:" != *":$HOME/.bin:"* ]]; then
echo 'export PATH="$HOME/.bin:$PATH"' >> ~/.zshrc
export PATH="$HOME/.bin:$PATH"
fi
### end common-components/check-home-bin
fancy_echo() {
printf "\n%b\n" "$1"
}
### end common-components/shared-functions
if ! grep -qiE 'precise|quantal|wheezy|raring|jessie|saucy|trusty' /etc/os-release; then
fancy_echo "Sorry! we don't currently support that distro."
exit 1
fi
### end linux-components/distro-check
fancy_echo "Updating system packages ..."
if command -v aptitude >/dev/null; then
fancy_echo "Using aptitude ..."
else
fancy_echo "Installing aptitude ..."
sudo apt-fast install -y aptitude
fi
sudo aptitude update
### end linux-components/debian-package-update
fancy_echo "Installing git, for source control management ..."
sudo aptitude install -y git
fancy_echo "Installing base ruby build dependencies ..."
sudo aptitude build-dep -y ruby1.9.3
fancy_echo "Installing libraries for common gem dependencies ..."
sudo aptitude install -y libxslt1-dev libcurl4-openssl-dev libksba8 libksba-dev libqtwebkit-dev libreadline-dev
fancy_echo "Installing Postgres, a good open source relational database ..."
sudo aptitude install -y postgresql postgresql-server-dev-all
fancy_echo "Installing ctags, to index files for vim tab completion of methods, classes, variables ..."
sudo aptitude install -y exuberant-ctags
fancy_echo "Installing vim ..."
sudo aptitude install -y vim-gtk
fancy_echo "Installing tmux, to save project state and switch between projects ..."
sudo aptitude install -y tmux
fancy_echo "Installing ImageMagick, to crop and resize images ..."
sudo aptitude install -y imagemagick
fancy_echo "Installing curl ..."
sudo aptitude install -y curl
fancy_echo "Installing zsh ..."
sudo aptitude install -y zsh
### end linux-components/debian-derivative-packages
fancy_echo "Install ubuntu update manager..."
sudo apt-fast install -y update-manager
### end linux-components/update-manager
if ! which ag &>/dev/null; then
fancy_echo "Installing The Silver Searcher (better than ack or grep) to search the contents of files ..."
git clone git://github.com/ggreer/the_silver_searcher.git /tmp/the_silver_searcher
sudo aptitude install -y automake pkg-config libpcre3-dev zlib1g-dev liblzma-dev
sh /tmp/the_silver_searcher/build.sh
cd /tmp/the_silver_searcher
sh build.sh
sudo make install
cd
rm -rf /tmp/the_silver_searcher
fi
### end linux-components/silver-searcher-from-source
fancy_echo "Install bitstream vera sans"
sudo apt-fast install -y ttf-bitstream-vera
### end linux-components/vera-bitstream-sans
fancy_echo "Installing gnome-terminal..."
sudo apt-fast -y install gnome-terminal
### end linux-components/gnome-terminal
### end linux-components/gnome-do
sudo apt-fast install -y python-software-properties
sudo add-apt-repository -y ppa:keithw/mosh
sudo apt-fast update
sudo apt-fast install -y mosh
### end linux-components/mosh
fancy_echo "Installing firefox..."
sudo apt-fast install -y firefox
### end linux-components/firefox
fancy_echo "Installing Google Chrome..."
sudo apt-fast install -y libxss1 xdg-utils
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome*.deb
rm google-chrome*.deb
### end linux-components/chrome
fancy_echo "Installing RVM, to change ruby versions..."
\curl -sSL https://get.rvm.io | bash
fancy_echo "Adding progress bar to rvm..."
echo progress-bar >> ~/.curlrc
fancy_echo "Source rvm..."
source ~/.rvm/scripts/rvm
### end linux-components/rvm
RUBY_VERSION="2.1.0"
fancy_echo "Installing Ruby $RUBY_VERSION ..."
rvm install $RUBY_VERSION
fancy_echo "Setting $RUBY_VERSION as global default Ruby ..."
rvm --default use $RUBY_VERSION
fancy_echo "Updating to latest Rubygems version ..."
gem update --system
fancy_echo "Installing Bundler to install project-specific Ruby gems ..."
gem install bundler --no-document --pre
fancy_echo "Installing GitHub CLI client ..."
curl http://hub.github.com/standalone -sLo ~/.bin/hub
chmod +x ~/.bin/hub
### end common-components/ruby-environment
fancy_echo "Configuring Bundler for faster, parallel gem installation ..."
number_of_cores=$(nproc)
bundle config --global jobs $((number_of_cores - 1))
### end linux-components/bundler
fancy_echo "Installing IRB tools ..."
gem install irbtools --no-document
fancy_echo "Installing Capistrano 2.15.5..."
gem install capistrano -v '2.15.5' --no-document
fancy_echo "Installing Rake..."
gem install rake --no-document
### end common-components/default-gems
fancy_echo 'Installing dotfiles...'
curl -Lo- http://bit.ly/1jDwRX3 | bash
### end common-components/dotfiles
fancy_echo "Installing archive formats..."
sudo apt-fast install -y unace unrar zip unzip p7zip-full p7zip-rar sharutils rar uudeview mpack arj cabextract file-roller
### end linux-components/archive-formats
fancy_echo "Installing conky..."
sudo apt-fast -y install conky-all
sudo apt-fast -y install conky curl lm-sensors hddtemp
### end linux-components/conky
fancy_echo "Installing dragondisk..."
sudo apt-fast -y install libssl0.9.8
wget http://download.dragondisk.com/dragondisk_1.0.5-0ubuntu_amd64.deb
sudo apt-fast -y install libqt4-dbus libqt4-network libqt4-xml libqtcore4 libqtgui4
sudo dpkg -i dragondisk_1.0.5-0ubuntu_amd64.deb
rm dragondisk*.deb
### end linux-components/dragondisk
fancy_echo "Installing flash plugin..."
sudo apt-fast install -y flashplugin-installer
### end linux-components/flash
fancy_echo "Installing gedit..."
sudo apt-fast -y install gedit
### end linux-components/gedit
fancy_echo "Installing gimp..."
sudo apt-fast install -y gimp gimp-data gimp-plugin-registry gimp-data-extras
### end linux-components/gimp
fancy_echo "Installing git-gui..."
sudo apt-fast install -y git-gui
### end linux-components/git-gui
fancy_echo "Installing mupdf..."
sudo add-apt-repository -y ppa:guilhem-fr/mupdf
sudo apt-fast update
sudo apt-fast install -y --force-yes mupdf
### end linux-components/mupdf
fancy_echo "Installing nixnote..."
sudo add-apt-repository -y ppa:vincent-c/nevernote
sudo apt-fast update
sudo apt-fast install -y nixnote
### end linux-components/nixnote
fancy_echo "Installing pidgin..."
sudo apt-fast install -y pidgin
### end linux-components/pidgin
fancy_echo "Installing Skype..."
sudo add-apt-repository -y "deb http://archive.canonical.com/ $(lsb_release -sc) partner"
sudo apt-fast update
sudo apt-fast install -y skype
### end linux-components/skype
fancy_echo "Installing Spotify..."
sudo chmod o+w /etc/apt/sources.list
sudo echo "deb http://repository.spotify.com stable non-free" >> /etc/apt/sources.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 94558F59
sudo apt-fast update
sudo apt-fast install -y spotify-client
### end linux-components/spotify
fancy_echo "Installing thunderbird..."
sudo apt-fast install -y thunderbird
### end linux-components/thunderbird
fancy_echo "Installing TLP..."
sudo apt-fast remove laptop-mode-tools
sudo add-apt-repository -y ppa:linrunner/tlp
sudo apt-fast update
sudo apt-fast install -y tlp
sudo tlp start
### end linux-components/tlp
fancy_echo "Installing ubuntu tweak..."
sudo add-apt-repository -y ppa:tualatrix/ppa
sudo apt-fast update
sudo apt-fast install -y ubuntu-tweak
### end linux-components/ubuntu-tweak
fancy_echo "Installing VLC..."
sudo apt-fast update
sudo apt-fast install -y vlc browser-plugin-vlc
### end linux-components/vlc
fancy_echo "Installing wallch..."
sudo add-apt-repository -y ppa:wallch/version-3-ppa
sudo apt-fast update
sudo apt-fast install -y wallch
### end linux-components/wallch
fancy_echo "Symlink .ssh at Dropbox"
ln -nfs ~/Dropbox/.ssh ~/.ssh
chmod go-w ~ ~/.ssh ~/.ssh/authorized_keys
chmod go-wr ~/.ssh/endpoint
chmod go-wr ~/.ssh/id_dsa
### end linux-components/symlink-dropbox-dot-ssh
fancy_echo "Installing Dropbox CLI tools..."
wget -O ~/bin/dropbox.py "http://www.dropbox.com/download?dl=packages/dropbox.py"
chmod 755 ~/bin/dropbox.py
fancy_echo "Installing Dropbox to run on startup..."
sudo wget -O /etc/init.d/dropbox "https://gist.github.com/timcase/aeb93cf00e17bde3cf8a/raw/1a1e92b2031aea905f7b179157d66cd2a6a2414b/dropbox_init.d"
sudo chmod +x /etc/init.d/dropbox
sudo update-rc.d dropbox defaults
fancy_echo "Installing Dropbox..."
cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
~/.dropbox-dist/dropboxd
### end linux-components/dropbox