-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·52 lines (40 loc) · 1.04 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
#!/bin/bash
git clone https://github.com/landcat222/dotfiles.git ~/.dotfiles
mkdir ~/.backup
# zsh files backup
if [ -e ~/.zshenv -a ! -L ~/.zshenv ];then
mv -b ~/.zshenv ~/.backup/zshenv
fi
if [ -e ~/.zshrc -a ! -L ~/.zshrc ];then
mv -b ~/.zshrc ~/.backup/zshrc
fi
if [ -e ~/.zprofile -a ! -L ~/.zprofile ];then
mv -b ~/.zprofile ~/.backup/zprofile
fi
if [ -e ~/.zlogin -a ! -L ~/.zlogin ];then
mv -b ~/.zlogin ~/.backup/zlogin
fi
if [ -e ~/.zlogout -a ! -L ~/.zlogout ];then
mv -b ~/.zlogout ~/.backup/zlogout
fi
if [ -e ~/.zsh -a ! -L ~/.zsh ];then
mv -b ~/.zsh ~/.backup/zsh
fi
# vim files backup
if [ -e ~/.vimrc -a ! -L ~/.vimrc ];then
mv -b ~/.vimrc ~/.backup/vimrc
fi
if [ -e ~/.vim -a ! -L ~/.vim ];then
mv -b ~/.vim ~/.backup/vim
fi
# xprofile backup
if [ -e ~/.xprofile -a ! -L ~/.xprofile ];then
mv -b ~/.xprofile ~/.backup/xprofile
fi
# zsh files install
ln -s ~/.dotfiles/zshenv ~/.zshenv
ln -s ~/.dotfiles/zsh ~/.zsh
# Vim files install
ln -s ~/.dotfiles/vim ~/.vim
# xprofile install
ln -s ~/.dotfiles/xprofile ~/.xprofile