-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup2.sh
48 lines (36 loc) · 866 Bytes
/
setup2.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
#!/bin/bash
echo "Beware, this script will remove or modify your dotfiles."
read
if [ -e ~/.gitconfig ]; then
echo "~/.gitconfig directory exists, bailing"
exit 0
fi
cd `dirname "$0"`
#####################
## Setup gitconfig ##
#####################
echo "Enter git email:"
read
git config --global user.email "$REPLY"
echo "Enter git name:"
read
git config --global user.name "$REPLY"
cat gitconfig >> ~/.gitconfig
#####################
#####################
## Setup Vim ##
#####################
echo "Beware... About to 'rm -rf ~/.vim ~/.vimrc' and replace vimrc files..."
echo "Press Enter to Continue..."
read
if [ -e ~/.vim ]; then
echo "~/.vim directory exists, bailing"
exit 0
fi
if [ -e ~/.vimrc ]; then
echo "~/.vimrc exists, bailing"
exit 0
fi
cp -r $(pwd)/vim ~/.vim
cp -r $(pwd)/vim/init.vim ~/.vimrc
#####################