-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·55 lines (45 loc) · 1.12 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
#!/bin/bash
DEBUG=${DEBUG:=0}
[ $DEBUG = '1' ] && echo "debug mode"
((DEBUG)) && echo $0
HERE=$(readlink -f $0)
((DEBUG)) && echo $HERE
CUR_PATH=$(cd $(dirname $HERE) && pwd)
((DEBUG)) && echo $CUR_PATH
grep "bash/prompt.sh" $HOME/.bashrc >>/dev/null
if [[ $? != 0 ]]; then
echo -e "\nsource $CUR_PATH/bash/prompt.sh" >>$HOME/.bashrc
fi
source $HOME/.bashrc
if [[ ! -d $HOME/.vim ]]; then
ln -s $CUR_PATH/vim $HOME/.vim
fi
#if [[ ! -d $HOME/.screenrc ]]; then
# ln -s $CUR_PATH/bash/screenrc $HOME/.screenrc
#fi
if [[ ! -d $HOME/.config/fish ]]; then
ln -s $CUR_PATH/fish $HOME/.config/fish
else
echo 'exist .config/fish'
fi
if [[ ! -d $HOME/.config/tmux ]]; then
ln -s $CUR_PATH/tmux $HOME/.config/tmux
else
echo 'exist .config/tmux dir'
fi
if [[ ! -d $HOME/.config/nvim ]]; then
#mkdir $HOME/.config/nvim
ln -s $CUR_PATH/nvim $HOME/.config/nvim
else
echo 'exist .config/nvim'
fi
if [[ ! -d $HOME/.config/gitui ]]; then
ln -s $CUR_PATH/gitui $HOME/.config/gitui
else
echo 'exist .config/gitui'
fi
if [[ ! -d $HOME/.config/zellij ]]; then
ln -s $CUR_PATH/zellij $HOME/.config/zellij
else
echo 'exist .config/zellij'
fi