-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·56 lines (46 loc) · 873 Bytes
/
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
56
#!/bin/sh
D=`dirname $0`
SELF_DIR=`cd $D;pwd`
set_symlink() {
if [ ! -e ~/$1 ]; then
echo "set symlink: $1"
ln -s ${SELF_DIR}/$1 ~
fi
}
copy() {
if [ ! -e ~/$1 ]; then
echo "copy: $1"
cp -a ${SELF_DIR}/$1 ~
fi
}
make_dir() {
if [ ! -d ~/$1 ]; then
echo "mkdir: $1"
mkdir $1
fi
}
# zsh
curl -L http://install.ohmyz.sh | sh
echo "set symlink: .zshrc"
if [ -e ~/.zshrc ]; then
rm ~/.zshrc
fi
ln -s ${SELF_DIR}/.zshrc ~
# mfiler2
set_symlink .mfiler
copy mint.rb
# vim
curl https://raw.githubusercontent.com/Shougo/neobundle.vim/master/bin/install.sh | sh
cp -a ${SELF_DIR}/.vim ~
if [ ! -e ~/.vimrc ]; then
ln -s ~/.vim/.vimrc ~
fi
# git
sudo install -m 0755 /usr/share/doc/git/contrib/diff-highlight/diff-highlight /usr/local/bin/
set_symlink .gitconfig
# ssh
copy .ssh
# tmux
set_symlink .tmux.conf
# other directories
make_dir src