-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·45 lines (34 loc) · 1004 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
#!/usr/bin/env bash
echo "Change the current shell to zsh"
#apt-get install zsh
sudo chsh -s $(which zsh)
# http://hintsforums.macworld.com/archive/index.php/t-73839.html
abspath=$(cd ${0%/*} && echo $PWD/${0##*/})
# to get the path only - not the script name - add
path_only=`dirname "$abspath"`
echo "initializing submodules"
git submodule init
git submodule update
echo "Deleting the old files"
rm ~/.vimrc
rm ~/.zshrc
rm -rf ~/.zsh
rm -rf ~/.oh-my-zsh
rm -rf ~/.vim
rm ~/.gitconfig
rm ~/.gitignore
rm ~/.tmux.conf
echo "Symlinking files"
ln -s ${PWD}/vimrc ~/.vimrc
ln -s ${PWD}/vim ~/.vim
ln -s ${PWD}/zshrc ~/.zshrc
ln -s ${PWD}/oh-my-zsh ~/.oh-my-zsh
ln -s ${PWD}/gitconfig ~/.gitconfig
ln -s ${PWD}/gitignore ~/.gitignore
ln -s ${PWD}/tmux ~/.tmux.conf
echo "Updating submodules"
git submodule foreach git pull origin master --recurse-submodules
echo "Patch zsh-theme"
rm -rf ~/.oh-my-zsh/themes/fg.zsh-theme
ln -s ${PWD}/fg.zsh-theme ~/.oh-my-zsh/themes/fg.zsh-theme
echo "All done."