forked from jumski/old-dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·125 lines (102 loc) · 4.2 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·125 lines (102 loc) · 4.2 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
#!/bin/bash
echo 'Installing scripts'
export DOTFILES_PATH=~/dotfiles
ln -s --force "$DOTFILES_PATH/bashrc" "$HOME/.bashrc"
ln -s --force "$DOTFILES_PATH/tmux.conf" "$HOME/.tmux.conf"
ln -s --force "$DOTFILES_PATH/gitconfig" "$HOME/.gitconfig"
ln -s --force "$DOTFILES_PATH/gitignore_global" "$HOME/.gitignore_global"
ln -s --force "$DOTFILES_PATH/vim/vimrc" "$HOME/.vimrc"
ln -s --force "$DOTFILES_PATH/gemrc" "$HOME/.gemrc"
ln -s --force "$DOTFILES_PATH/irbrc" "$HOME/.irbrc"
ln -s --force "$DOTFILES_PATH/pryrc" "$HOME/.pryrc"
ln -s --force "$DOTFILES_PATH/ackrc" "$HOME/.ackrc"
ln -s --force "$DOTFILES_PATH/kderc" "$HOME/.kderc"
ln -s --force "$DOTFILES_PATH/vromerc" "$HOME/.vromerc"
ln -s --force "$DOTFILES_PATH/xhotkeys" "$HOME/.xhotkeys"
ln -s --force "$DOTFILES_PATH/vendor/dircolors.256dark" "$HOME/.dircolors"
ln -s --force -T "$DOTFILES_PATH/tmuxinator" "$HOME/.tmuxinator"
ln -s --force -T "$DOTFILES_PATH/dotjs" "$HOME/.js"
ln -s --force "$DOTFILES_PATH/Xdefaults" "$HOME/.Xdefaults"
ln -s --force "$DOTFILES_PATH/sh-todo" "$HOME/.sh-todo"
if [ ! -d $HOME/dropbox ]; then
ln -s --force $HOME/Dropbox $HOME/dropbox
fi
if [ -d $HOME/.kde/share/apps/konsole ]; then
ln -s --force "$DOTFILES_PATH/vendor/kde/share/apps/konsole/konsoleui.rc" "$HOME/.kde/share/apps/konsole/konsoleui.rc"
ln -s --force "$DOTFILES_PATH/vendor/kde/share/apps/konsole/solarized_dark.colorscheme" "$HOME/.kde/share/apps/konsole/solarized_dark.colorscheme"
ln -s --force "$DOTFILES_PATH/vendor/kde/share/apps/konsole/tmux-main.profile" "$HOME/.kde/share/apps/konsole/tmux-main.profile"
ln -s --force "$DOTFILES_PATH/vendor/kde/share/apps/konsole/tmux-guard.profile" "$HOME/.kde/share/apps/konsole/tmux-guard.profile"
fi
function log() {
echo "-- ${1}"
}
# install git if missing
which git 2>/dev/null >/dev/null || sudo apt-get install -y git
# install curl if missing
which curl 2>/dev/null >/dev/null || sudo apt-get install -y curl
# init submodules
git submodule update --init
# install vendor debs
has_20_bash_completion() {
dpkg -l | grep bash-completion | awk '{print $3}' | grep '2.0'
}
if ! has_20_bash_completion; then
log 'Intalling bash-completion 2.0'
sudo apt-get purge bash-completion &&
sudo dpkg -i $DOTFILES_PATH/vendor/bash-completion_2.0-1_all.deb
fi
# link chromium to fake google-chrome for some apps
if ! which google-chrome && which chromium-browser; then
sudo ln -s $(which chromium-browser) /usr/bin/google-chrome
fi
# set up rvm
if [ ! -d $HOME/.rvm ]; then
#log 'Installing RVM'
#curl -L https://get.rvm.io | bash -s stable --ruby
log 'Installing RVM requirements'
sudo $(rvm requirements|grep -A1 "# For Ruby"|grep "ruby:"|cut -c9-|sed 's/install/install -y/g')
log 'Installing ruby-falcon'
rvm get head && rvm reinstall 1.9.3-perf --patch falcon
source bashrc
rvm use 1.9.3-perf --default
fi
# copy local_variables sample, if not present
if [ ! -f $HOME/.local_variables ]; then
cp $DOTFILES_PATH/bash/local_variables.sample $HOME/.local_variables
fi
# make git-dude dir
test -d $HOME/.git-dude || mkdir $HOME/.git-dude
(which ack-grep && ! which ack) && sudo ln -s /usr/bin/ack-grep /usr/bin/ack
(which python && ! which fu) && (cd vendor/fu && sudo python setup.py install)
# install wget
if ! which wget ; then
sudo apt-get install wget
fi
# install dropbox
if ! which dropbox; then
wget -O /tmp/dropbox.deb https://www.dropbox.com/download?dl=packages/ubuntu/dropbox_1.4.0_amd64.deb
sudo dpkg -i /tmp/dropbox.deb && rm /tmp/dropbox.deb
fi
# openbox
if [ -d $HOME/.config/openbox ]; then
ln -s --force $DOTFILES_PATH/conf/openbox/lubuntu-rc.xml $HOME/.config/openbox/
ln -s --force $DOTFILES_PATH/conf/startup.desktop $HOME/.config/autostart/
fi
# vundle
if [ ! -d ~/.vim/bundle/vundle ]; then
echo "Vundle not found - installing"
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
vim -se -c BundleInstall -c qa
fi
mkdir -p $HOME/.vim-tmp
# fonts
FONT_DIR=$HOME/.fonts
FONT_PATH=$FONT_DIR/Monaco_Linux-Powerline.ttf
if [ ! -f $FONT_PATH ]; then
mkdir $FONT_DIR
wget https://gist.github.com/raw/1634235/d1e0dd8b745a7868444ecb0d1d6cdb593249f9d5/Monaco_Linux-Powerline.ttf -O $FONT_PATH
fc-cache -vf
fi
echo 'Load bashrc'
source ~/dotfiles/bashrc
source ~/dotfiles/bash/aliases.sh