-
Notifications
You must be signed in to change notification settings - Fork 6
/
sync_dotfiles.sh
67 lines (55 loc) · 1.7 KB
/
sync_dotfiles.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
62
63
64
65
66
67
#!/bin/bash
if [ ! -d ~/.oh-my-zsh ]; then
#install ohmyzsh
echo "no oh-my-zsh"
curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
mv ~/.zshrc ~/._zshrc
else
echo "oh-myzsh exists"
fi
#backup ~
mkdir -p ~/.zsh_backup
mv ~/.zsh_docker ~/.zsh_backup/
mv ~/.zsh_machine ~/.zsh_backup/
mv ~/.zsh_kubernetes ~/.zsh_backup/
mv ~/.zsh_git ~/.zsh_backup/
mv ~/.zsh_node ~/.zsh_backup/
mv ~/.zsh_paths ~/.zsh_backup/
mv ~/.zsh_profile ~/.zsh_backup/
mv ~/.zsh_ruby ~/.zsh_backup/
mv ~/.zsh_vagrant ~/.zsh_backup/
mv ~/.zshrc ~/.zsh_backup/
mv ~/.functions ~/.zsh_backup/
mv ~/.gitconfig ~/.zsh_backup/
mv ~/.gitignore_global ~/.zsh_backup/
mv ~/.mongorc.js ~/.zsh_backup/
mv ~/.multitailrc ~/.zsh_backup/
mv ~/.vim ~/.zsh_backup/
mv ~/.vimrc ~/.zsh_backup/
mv ~/.wgetrc ~/.zsh_backup/
mv ~/.oh-my-zsh/themes/cam.zsh-theme ~/.zsh_backup/
#relink
ln -s ~/Code/dotfiles/ohmyzsh/cam.zsh-theme ~/.oh-my-zsh/themes
ln -s ~/Code/dotfiles/.zsh_docker ~/
ln -s ~/Code/dotfiles/.zsh_kubernetes ~/
ln -s ~/Code/dotfiles/.zsh_git ~/
ln -s ~/Code/dotfiles/.zsh_node ~/
ln -s ~/Code/dotfiles/.zsh_paths ~/
ln -s ~/Code/dotfiles/.zsh_profile ~/
ln -s ~/Code/dotfiles/.zsh_ruby ~/
ln -s ~/Code/dotfiles/.zsh_vagrant ~/
ln -s ~/Code/dotfiles/.zshrc ~/
ln -s ~/Code/dotfiles/.functions ~/
ln -s ~/Code/dotfiles/.mongorc.js ~/
ln -s ~/Code/dotfiles/.multitailrc ~/
ln -s ~/Code/dotfiles/.vim ~/
ln -s ~/Code/dotfiles/.vimrc ~/
ln -s ~/Code/dotfiles/.wgetrc ~/
ln -s ~/Code/dotfiles/.gitconfig ~/
ln -s ~/Code/dotfiles/.gitignore_global ~/
touch ~/.zsh_machine
touch ~/.zsh_vpn
touch ~/.gitconfig.local
# Install the Solarized Dark theme for iTerm
open "${HOME}/Code/dotfiles/iterm2/cam.itermcolors"
source ~/.zshrc