forked from Catorpilor/linux_config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MakeFile.sh
74 lines (59 loc) · 1.25 KB
/
MakeFile.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/bash
cd .
CF_DIR=`pwd`
#更新配置的子模块到最新版本
git submodule init
git submodule update
git submodule -q foreach git pull -q origin master
#.bash_profile
ln -s $CF_DIR/aliases/bash_profile ~/.bash_profile
# jump tool
ln -s $CF_DIR/aliases/markrc ~/.markrc
#alias
ALIASES_DIR="$CF_DIR/aliases"
ALIASES_FILES=`ls $ALIASES_DIR/*aliases`
for f in $ALIASES_FILES
do
F_NAME=`basename $f`
ln -s $f ~/"."$F_NAME
done
#dir_colors
#ln -s dircolors.256dark ~/.dir_colors
ln -s $CF_DIR/dircolors-solarized/dircolors.256dark .dir_colors
#completion
COMPLETION_DIR="$CF_DIR/completions"
ALIASES_FILES=`ls $COMPLETION_DIR/*completion`
for f in $ALIASES_FILES
do
F_NAME=`basename $f`
ln -s $f ~/"."$F_NAME
done
#自动安装配置vim
sh -x $CF_DIR/k-vim/install.sh
#bin
ln -s $CF_DIR/bin ~/bin
if [ ! -d ~/tmp ]
then
mkdir ~/tmp
fi
#vim bk and undo dir
if [ ! -d ~/bak/vimbk ]
then
mkdir -p ~/bak/vimbk
fi
if [ ! -d ~/bak/vimundo ]
then
mkdir -p ~/bak/vimundo
fi
#configs
#for ssh
if [ -d ~/.ssh ]
then
mkdir -p ~/.ssh
fi
ln -s $CF_DIR/config/ssh-config ~/.ssh/config
#for tmux
#ln -s $CF_DIR/config/tmux-config ~/.tmux.conf
ln -s $CF_DIR/config/tmux.conf ~/.tmux.conf
#for git
ln -s $CF_DIR/config/git-config ~/.gitconfig