-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.sh
More file actions
executable file
·64 lines (53 loc) · 1.33 KB
/
Copy pathinit.sh
File metadata and controls
executable file
·64 lines (53 loc) · 1.33 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
#!/bin/bash
OH_MY_ZSH_DIR=$HOME/.oh-my-zsh
if [ ! -d $HOME/.dotfiles ]; then
echo "Dotfiles do not exist."
cd $HOME
git clone https://github.com/zachseifts/dotfiles.git .dotfiles
else
echo "Dotfiles exist, pulling in changes"
cd $HOME/.dotfiles
git pull
fi
cd $HOME/.dotfiles
git submodule update --init --recursive
if [ -d $OH_MY_ZSH_DIR ]; then
cd $OH_MY_ZSH_DIR
git pull
cd $HOME
else
echo "Checking out oh-my-zsh"
cd $HOME
git clone https://github.com/robbyrussell/oh-my-zsh.git .oh-my-zsh
fi
cd $HOME
echo "Creating symlinks"
# Symlink the tmux.conf
if [ -L $HOME/.tmux.conf ]; then
echo 'tmux.conf symlink exists, removing'
rm $HOME/.tmux.conf
fi
ln -s .dotfiles/tmux.conf $HOME/.tmux.conf
echo "creating symlink to $HOME/.tmux.conf"
# Symlink the .vim folder
if [ -L $HOME/.vim ]; then
echo 'vim symlink exists, removing'
rm $HOME/.vim
fi
ln -s .dotfiles/vim $HOME/.vim
echo "creating symlink to $HOME/.vim"
# Symlink the .vimrc folder
if [ -L $HOME/.vimrc ]; then
echo 'vim symlink exists, removing'
rm $HOME/.vimrc
fi
ln -s .dotfiles/vimrc $HOME/.vimrc
echo "creating symlink to $HOME/.vimrc"
# Symlink the .zshrc folder
if [ -L $HOME/.zshrc ]; then
echo 'zshrc symlink exists, removing'
rm $HOME/.zshrc
fi
ln -s .dotfiles/zshrc $HOME/.zshrc
echo "creating symlink to $HOME/.zshrc"
echo "Okay, done."