forked from vitorleal/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
77 lines (58 loc) · 1.66 KB
/
install.sh
File metadata and controls
77 lines (58 loc) · 1.66 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
#!/usr/bin/env bash
# Dotfiles
echo "• Putting dotfiles in your home path: $HOME"
files=(
"./.aliases"
"./.bash_profile"
"./.bash_prompt"
"./.bashrc"
"./.exports"
"./.gitconfig"
"./.gitignore"
"./.screenrc"
"./.vim"
"./.vimrc"
)
for file in ${files[@]}; do
if [[ $(file $file | awk '{print $2}') == "directory" ]]; then
[ -r "$file" ] && cp -r "$file" $HOME && echo " - Copied folder $file"
else
[ -r "$file" ] && cp "$file" $HOME && echo " - Copied file $file"
fi;
done;
unset file files;
echo ""
# Git configuration
echo "• Git / GitHub configuration"
read -p " - What your Git user.name? " git_name
git config --global user.name "$git_name"
read -p " - What your Git user.email? " git_email
git config --global user.email $git_email
echo ""
# Reload the bash profile
echo "• Reload the bash profile"
source $HOME/.bashrc
echo ""
# Homebrew
echo "• Check if Homebrew is installed"
if [[ $(which brew) != "" ]]; then
echo " - Homebrew already installed"
else
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo " - Done installing Homebrew"
fi;
echo "• Install Homebrew apps"
source brew.sh
echo ""
# Preparing VIM and Vundle Plugins
echo "• Preperaing Vim and Vundle Plugins"
if [[ -r "$HOME/.vim/bundle/Vundle.vim" ]]; then
echo " - Vundle already installed. Lets install the plugins"
vim +PluginInstall +qall
echo " - Done installing the Plugins"
else
echo " - Lets install Vundle Plugin Manager"
git clone https://github.com/gmarik/Vundle.vim.git $HOME/.vim/bundle/Vundle.vim
vim +PluginInstall +qall
echo " - Done installing the Plugins"
fi;