forked from mathiasbynens/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsync.sh
More file actions
executable file
·22 lines (19 loc) · 753 Bytes
/
sync.sh
File metadata and controls
executable file
·22 lines (19 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
chsh -s /bin/zsh
cd "$(dirname "${BASH_SOURCE}")"
git pull
function doIt() {
rsync -av zsh-themes/. ~/.oh-my-zsh/themes/
rsync --exclude ".git/" --exclude ".DS_Store" --exclude "sync.sh" --exclude "Brewfile" --exclude "Caskfile" --exclude "homebrew.sh" --exclude "npm-debug.log" --exclude "iterm/" --exclude "osx-for-hackers.sh" --exclude "zsh-themes/" --exclude "install-local.sh" --exclude "README.md" --exclude "dotfiles.sublime-workspace" --exclude "dotfiles.sublime-project" -av --no-perms . ~
source ~/.zshrc
}
if [ "$1" == "--force" -o "$1" == "-f" ]; then
doIt
else
read -p "This may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
doIt
fi
fi
unset doIt