-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
61 lines (48 loc) · 1.46 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
56
57
58
59
60
61
#!/bin/zsh
set -e
echo "Continuing with this installation will overwrite your exist local settings."
echo -n "Continue anyway?(y/N)"
read ans
if [[ ${ans} = 'n' || ${ans} = 'N' || ${ans} = '' ]]; then
echo "User abort."
exit 0
elif [[ ${ans} != 'y' && ${ans} != 'Y' ]]; then
echo "Invalid answer"
exit 1
fi
# common shell stuff
ln -fsT ${PWD}/shells/profile ~/.profile
# Bash staff:
ln -fsT ${PWD}/shells/bash/bash_profile ~/.bash_profile
ln -fsT ${PWD}/shells/bash/profile.d ~/.profile.d
ln -fsT ${PWD}/shells/bash/bashrc ~/.bashrc
ln -fsT ${PWD}/shells/bash/bashrc.d ~/.bashrc.d
# Zsh staff:
ln -fsT ${PWD}/shells/zsh/zprofile ~/.zprofile
ln -fsT ${PWD}/shells/zsh/zshrc ~/.zshrc
# Your local executable stuff
mkdir -p ~/bin
# Vim staff:
ln -fsT ${PWD}/vimfiles/vimrc ~/.vimrc
ln -fsT ${PWD}/vimfiles ~/.vim
# X related
ln -fsT ${PWD}/xorg/Xmodmap ~/.Xmodmap
ln -fsT ${PWD}/xorg/xprofile ~/.xprofile
# font conf
ln -fsT ${PWD}/fontconf/fonts.conf ~/.fonts.conf
# Python stuff
ln -fsT ${PWD}/python/pythonrc ~/.pythonrc
# global git configuration:
# if merge on .gitconfig failed, git will refuse to work.
# so just provide the copy them if absent.
if [ ! -r ~/.gitconfig -a ! -r ~/.gitignore ]; then
cp ${PWD}/gitconfig/gitconfig ~/.gitconfig
cp ${PWD}/gitconfig/gitignore ~/.gitignore
fi
# web
# don't forget to setup your web browsers ;)
ln -fsT ${PWD}/web/proxy.pac ~/proxy.pac
# misc
ln -fsT ${PWD}/misc/toprc ~/.toprc
echo "You may refer to use zsh as the login shell"
chsh