-
Notifications
You must be signed in to change notification settings - Fork 7
/
provision-complete.sh
executable file
·75 lines (67 loc) · 2.45 KB
/
provision-complete.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
function symlink_dotfiles() {
sync_directory="$HOME/Dropbox/Fresh Install/Shell"
# Create an Array holding a list of dotfiles to symlink: foo=( bar baz qux )
# Run a command substitution: $(foo) -> which returns result of sub command being run
# List all files including those prefixed with a dot: ls -a
# Then search (grep) for the dotfiles and ignore those we're not interested in: --invert-match
files=( $(ls -a "$sync_directory" | grep '^\.' | grep --invert-match '\.DS_Store\|\.$') )
# Loop through the Array creating symlinks
for file in "${files[@]}"
do
ln -s "$sync_directory"/$file $HOME/$file
done
}
function install_weechat_notifications() {
cd $HOME
sudo gem install weechat terminal-notifier
curl https://raw.github.com/wallace/weechat-notification-center-rb/master/notification_center.rb > \
~/.weechat/ruby/autoload/notification_center.rb
# We have to install these gems into the system Ruby
# So simplest way is to move into the home directory
# We can't run this function until after we've symlinked our dotfiles
}
function install_vim_plugins() {
cd "$HOME/.vim/bundle"
plugins=( airblade/vim-gitgutter \
ap/vim-css-color \
bling/vim-airline \
edkolev/tmuxline.vim \
ervandew/supertab \
gcmt/wildfire.vim \
godlygeek/tabular \
guns/vim-sexp \
kien/ctrlp.vim \
kien/rainbow_parentheses.vim \
MattesGroeger/vim-bookmarks \
mattn/emmet-vim \
mattn/webapi-vim \
mileszs/ack.vim \
othree/html5.vim \
scrooloose/nerdtree \
scrooloose/syntastic \
sheerun/vim-polyglot \
t9md/vim-choosewin \
tpope/vim-commentary \
tpope/vim-cucumber \
tpope/vim-dispatch \
tpope/vim-endwise \
tpope/vim-fugitive \
tpope/vim-haml \
tpope/vim-markdown \
tpope/vim-repeat \
tpope/vim-sexp-mappings-for-regular-people \
tpope/vim-surround \
vim-scripts/camelcasemotion \
vim-scripts/Gist.vim \
vim-scripts/Tabmerge \
vim-scripts/textutil.vim \
vim-scripts/ZoomWin \
wellle/targets.vim )
for item in "${plugins[@]}"
do
git clone "https://github.com/$item.git"
done
}
symlink_dotfiles && \
install_weechat_notifications && \
install_vim_plugins