-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_old.sh
executable file
·38 lines (33 loc) · 935 Bytes
/
install_old.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
#!/bin/bash
# Specific config files
VUNDLE=vundles.vim
VIMRC=.vimrc
TMUXCONFIG=.tmux.conf
BASHRC=.bashrc
PROFILERC=.profile
# some specific folders
VIMDIR=~/.vim
CONFIGDIR=./config
# Path of target files
VIMRCPATH=~/$VIMRC
VUNDLEPATH=$VIMDIR/$VUNDLE
TMUXCONFIGPATH=~/$TMUXCONFIG
BASHRCPATH=~/$BASHRC
PROFILERCPATH=~/$PROFILERC
# rsync -avP [SRC] [TARGET]
if [ "$1" == "backup" ]; then
echo $VIMRCPATH
echo $CONFIGDIR/$VIMRC
rsync -avP $VIMRCPATH $CONFIGDIR/$VIMRC
rsync -avP $VUNDLEPATH $CONFIGDIR/$VUNDLE
rsync -avP $TMUXCONFIGPATH $CONFIGDIR/$TMUXCONFIG
rsync -avP $BASHRCPATH $CONFIGDIR/$BASHRC
rsync -avP $PROFILERCPATH $CONFIGDIR/$PROFILERC
elif [ "$1" == "restore" ]; then
echo starting restore
rsync -avP $CONFIGDIR/$VIMRC $VIMRCPATH
rsync -avP $CONFIGDIR/$VUNDLE $VUNDLEPATH
rsync -avP $CONFIGDIR/$TMUXCONFIG $TMUXCONFIGPATH
rsync -avP $CONFIGDIR/$BASHRC $BASHRCPATH
rsync -avP $CONFIGDIR/$PROFILERCPATH $PROFILERCPATH
fi