forked from Catorpilor/linux_config
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakeFile.sh
More file actions
76 lines (61 loc) · 1.24 KB
/
MakeFile.sh
File metadata and controls
76 lines (61 loc) · 1.24 KB
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
75
76
#!/bin/bash
cd .
CF_DIR=`pwd`
#git submodule init
#git submodule update
#更新配置的子模块到最新版本
git submodule -q foreach git pull -q origin master
#.bash_profile
ln -sf $CF_DIR/aliases/bash_profile ~/.bash_profile
#alias
ALIASES_DIR="$CF_DIR/aliases"
ALIASES_FILES=`ls $ALIASES_DIR/*aliases`
for f in $ALIASES_FILES
do
F_NAME=`basename $f`
ln -sf $f ~/"."$F_NAME
done
#dir_colors
ln -sf $ALIASES_DIR/dir_colors ~/.dir_colors
ln -sf $ALIASES_DIR/dircolors.256dark ~/.dircolors
#completion
COMPLETION_DIR="$CF_DIR/completions"
ALIASES_FILES=`ls $COMPLETION_DIR/*completion`
for f in $ALIASES_FILES
do
F_NAME=`basename $f`
ln -sf $f ~/"."$F_NAME
done
#vim config
#ln -sf $CF_DIR/k-vim ~/.vim
#if [ -L $CF_DIR/k-vim/vim ]
#then
# rm $CF_DIR/k-vim/vim
#fi
#ln -sf $CF_DIR/k-vim/vimrc ~/.vimrc
#自动安装配置vim
sh -x $CF_DIR/k-vim/install.sh
#bin
ln -sf $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