forked from learning/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·37 lines (30 loc) · 894 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
#!/bin/bash
# link dotfiles to home directory
# get the OS type
OS=$(uname -s)
# get current working directory
CWD=$(cd "$(dirname "$0")"; pwd)
# For zsh
rm ~/.zshrc
ln -s $CWD/.zshrc ~/.zshrc
# For vim
rm ~/.vimrc
ln -s $CWD/.vimrc ~/.vimrc
# For tmux
rm ~/.tmux.conf
ln -s $CWD/.tmux.conf ~/.tmux.conf
# For Sublime Text 3
if [ $OS = "Darwin" ]; then
SUBLIME="$HOME/Library/Application Support/Sublime Text 3/Packages/User"
else
SUBLIME="$HOME/.config/sublime-text-3/Packages/User"
fi
_IFS_=$IFS
IFS="|"
rm $SUBLIME/Python.sublime-build
ln -s "$CWD/Sublime Text 3/Python.sublime-build" $SUBLIME/Python.sublime-build
rm $SUBLIME/Preferences.sublime-settings
ln -s "$CWD/Sublime Text 3/Preferences.sublime-settings" $SUBLIME/Preferences.sublime-settings
rm $SUBLIME/Emmet.sublime-settings
ln -s "$CWD/Sublime Text 3/Emmet.sublime-settings" $SUBLIME/Emmet.sublime-settings
IFS=$_IFS_