-
Notifications
You must be signed in to change notification settings - Fork 2
/
install.sh
executable file
·120 lines (90 loc) · 2.71 KB
/
install.sh
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
#!/bin/bash
inst () { sudo apt-get install $@; }
with_color () { echo -e "\033[$2m$1\033[0m"; }
suc () { with_color "\n### $1 ###" 92; }
log () { with_color "\n######### $1 #########\033[0m" 93; }
hint () { with_color "Hint: $1" 36; }
loginst () { log "Installing $1"; }
log_and_inst () { loginst $1; inst $1; }
log_and_mkdir () { log "Creating $1"; mkdir -p $1; }
add_repos () {
# appears that the add-apt-repository function takes only one argument
for repo in "$@" ; do
sudo add-apt-repository $repo
done
sudo apt-get update
}
gem_inst () {
for impl in jruby ruby ; do
rvm use $impl
gem install "$@"
done
}
create_user_files () {
for file in "$@" ; do
touch "$file.user"
done
}
suc 'Beginning Installation'
log 'Updating repositories'
add_repos ppa:pi-rho/dev ppa:keithw/mosh ppa:mizuno-as/silversearcher-ag
log_and_inst libcurl4-openssl-dev
hint 'This was installed just in case git needs it'
log_and_inst curl
log_and_inst git
log 'Installing rvm'
curl -SL https://get.rvm.io | bash
# need to source rvm in this script to run it as a shell function
source "$HOME/.rvm/scripts/rvm"
log_and_inst zsh
chsh -s /bin/zsh $USER
hint "zsh set as default shell for user $USER"
log_and_inst tmux
loginst mosh
inst python-software-properties
inst mosh
log 'Getting MRI ruby'
rvm install ruby
log 'Getting jruby'
rvm install jruby
log 'Getting rake, bundler, tmuxinator, pry and awesome_print'
gem_inst rake bundler tmuxinator pry awesome_print
log_and_inst vim-athena
loginst janus
curl -Lo- https://bit.ly/janus-bootstrap | bash
mkdir -p ~/.janus
hint 'Created ~/.janus directory to add customizations'
log_and_inst exuberant-ctags
loginst ack
hint "It's called ack-grep on ubuntu platforms"
inst ack-grep
sudo ln -sf /usr/bin/ack-grep /usr/local/bin/ack
hint "Linked ack-grep to ack"
loginst ag
inst silversearcher-ag
loginst leiningen
sudo curl https://raw.github.com/technomancy/leiningen/stable/bin/lein > /bin/lein
sudo chmod a+x /bin/lein
hint 'The installation will complete itself the first time you run lein'
log_and_mkdir ~/code
log_and_mkdir ~/tools
loginst 'hub'
git clone git://github.com/github/hub.git
cd hub
cd ..
sudo rake install prefix=/usr/local
rm -rf hub
log_and_inst tree
log_and_inst cmake
log_and_inst python-dev
log_and_inst libxml2
inst libx11-dev libxtst-dev libxi-dev
hint "These libs will be used by xcape"
log 'Creating user files'
create_user_files gitconfig
rake # installs all customizations
rake compile # not part of the default task, as it usually takes a while
hint "Don't forget to use a powerline font in your terminal emulator"
hint "Oh and add your git user information in the gitconfig.user file!"
suc Success!
echo "Now close this terminal and start a new one. Enjoy!"