forked from thoughtbot/laptop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlinux-arch
More file actions
151 lines (113 loc) · 4.65 KB
/
Copy pathlinux-arch
File metadata and controls
151 lines (113 loc) · 4.65 KB
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
#!/bin/bash
#
# laptop setup script for arch distributions
#
# Generated: Fri Apr 19 10:33:30 EDT 2013
#
###
#
# Source: lib/support.sh
#
###
CLEAR="\033[0m"
ORANGE="\033[33m"
successfully() {
$* || { echo "failed" >&2; exit 1 }
}
fancy_echo() {
echo -e "${ORANGE}$*${CLEAR}\n"
}
###
#
# Source: lib/arch.sh
#
###
update_system() {
pacman -Syu
}
install_pkg() {
successfully sudo pacman -S $1
}
###
#
# Source: lib/main.sh
#
###
fancy_echo "Updating system packages ..."
update_system
fancy_echo "Installing zsh ..."
successfully sudo aptitude install -y zsh
fancy_echo "Changing your shell to zsh ..."
successfully chsh -s `which zsh`
fancy_echo "Installing curl for transferring data with URL syntax ..."
install_pkg curl # Comes in Arch base already
fancy_echo "Installing xclip for clipboard integration with your terminal ..."
install_pkg xclip
fancy_echo "Installing git, for source control management ..."
install_pkg git
fancy_echo "Installing base ruby build dependencies ..."
successfully sudo aptitude build-dep -y ruby1.9.3 # Not needed on Arch
fancy_echo "Installing libraries for common gem dependencies ..."
install_pkg libxslt1-dev libcurl4-openssl-dev libksba8 libksba-dev libqtwebkit-dev # Not all needed on Arch
fancy_echo "Installing Postgres, a good open source relational database ..."
install_pkg postgresql postgresql-server-dev-all # Arch is just "postgresql"
fancy_echo "Installing Redis, a good key-value database ..."
install_pkg redis-server # Arch is just "redis"
fancy_echo "Installing The Silver Searcher (better than ack or grep) for searching the contents of files ..."
# Arch has an AUR package for this
successfully git clone git://github.com/ggreer/the_silver_searcher.git /tmp/the_silver_searcher
install_pkg 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, for indexing files for vim tab completion of methods, classes, variables ..."
install_pkg exuberant-ctags
fancy_echo "Installing vim ..."
install_pkg vim-gtk # Arch calls this gvim?
fancy_echo "Installing tmux, for saving project state and switching between projects ..."
install_pkg tmux # I want screen :(
fancy_echo "Installing ImageMagick, for cropping and re-sizing images ..."
install_pkg imagemagick
fancy_echo "Installing watch, used to execute a program periodically and show the output ..."
install_pkg watch
fancy_echo "Installing rbenv for changing Ruby versions ..."
# Arch has an AUR package for this -- also, I want chruby :(
successfully git clone git://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
export PATH="$HOME/bin:$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
fancy_echo "Installing rbenv-gem-rehash so the shell automatically picks up binaries after installing gems with binaries..."
# Arch has an AUR package for this
successfully git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
fancy_echo "Installing ruby-build for installing Rubies ..."
# Arch has an AUR package for this
successfully git clone git://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 "Update 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 ..."
# Arch has an AUR package for this
successfully wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh
fancy_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
if ! grep -qs "DO NOT EDIT BELOW THIS LINE" ~/.zshrc; then
fancy_echo "Prepare ~/.zshrc for http://github.com/thoughtbot/dotfiles ..."
successfully echo "# DO NOT EDIT BELOW THIS LINE\n" >> ~/.zshrc
fi
fancy_echo "Your shell will now restart to apply changes."
exec `which zsh` -l
###