-
Notifications
You must be signed in to change notification settings - Fork 2
/
install.sh
60 lines (47 loc) · 1.37 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
#!/usr/bin/env bash
# The dotfile initial
os_name=$(uname -s)
# Linux
_linux_os() {
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
rm -rf ~/.bashrc
ln -s ~/.dotfiles/bashrc ~/.bashrc
ln -s ~/.dotfiles/vim/vimrc ~/.vimrc
ln -s ~/.dotfiles/.git-completion.bash ~/.git-completion.bash
ln -s ~/.dotfiles/welcome-terminal.txt ~/.welcome-terminal.txt
}
# Mac OS Darwin
_darwin_os() {
_clearExistingFiles
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
ln -s ~/.dotfiles/bashrc ~/.bashrc
ln -s ~/.dotfiles/vim/vimrc ~/.vimrc
ln -s ~/.dotfiles/bash_profile ~/.bash_profile
ln -s ~/.dotfiles/profile ~/.profile
ln -s ~/.dotfiles/welcome-terminal.txt ~/.welcome-terminal.txt
}
_vim_plugins() {
echo "Getting Vim-Plug"
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
}
# Common functions
_clearExistingFiles() {
rm -rf ~/.bashrc
rm -rf ~/.vimrc
rm -rf ~/.bash_profile
rm -rf ~/.git-completion.bash
rm -rf ~/.welcome-terminal.txt
}
_dotfile() {
echo "dotfiles"
}
if [ $os_name = "Darwin" ]
then
echo "Configurations for Mac OS"
_clearExistingFiles
_darwin_os
else
echo "Configurations for Linux/Unix"
_linux_os
fi