]> Tony Duckles's Git Repositories (git.nynim.org) - dotfiles.git/blob - bin/sync-home
Merge branch 'master' into epic
[dotfiles.git] / bin / sync-home
1 #!/bin/sh
2 # Usage: sync-home [user@]host ...
3 # Copy crucial dotfiles and scripts to one or more remote machines.
4 #
5 # Copyright (c) 2008 Ryan Tomayko <http://tomayko.com/about>
6 set -e
7
8 test -z "$1" || echo "$@" | grep -q -- '--help' && {
9 echo "Usage: $0 [user@]host ..."
10 exit 1
11 }
12
13 cd ~
14 for host in "$@"; do
15 echo "sync: $host"
16 rsync -avz --include-from=- --exclude='*' ./ "${host}:" <<FILES
17 + /.inputrc
18 + /.bashrc
19 + /.dircolors
20 + /.bash_completion
21 + /.bash_completion.d
22 + /.bash_completion.d/**
23
24 + /.screenrc
25 + /.gitshrc
26 + /.gitconfig
27
28 + /.vimrc
29 + /.vim
30 - /.vim/sessions
31 - /.vim/plugin/netrwPlugin.vim
32 - /.vim/plugin/ruby_debugger.vim
33 - /.vim/swap
34 - /.vim/.netrwhist
35 - /.vim/tmp
36 + /.vim/backup
37 - /.vim/backup/**
38 + /.vim/**
39
40 + /bin
41 + /bin/ack
42 + /bin/addr
43 + /bin/github-grab
44 + /bin/git-ignore
45 + /bin/git-sh
46 + /bin/gzball
47 + /bin/headers
48 + /bin/lgrep
49 + /bin/sync-home
50 FILES
51 done