Skip to content

Commit

Permalink
Add bombich rsync copier.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaltaks committed Dec 3, 2011
1 parent 4a8a58f commit 61fce13
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions copiers.d/17-rsync-bombich.cp
@@ -0,0 +1,25 @@
#!/bin/sh

rsync=/usr/local/bin/rsync

flags="-aNHAXx --fileflags --protect-decmpfs --force-change --rsync-path=$rsync"

# Should exit with code 0 if the necessary programs exist, 1 otherwise
can-copy () {
test -e $rsync
}

# Should generate some text on stdout identifying which version of the
# copier is being used, and how it's called. This is optional.
version () {
$rsync --version
echo
echo "command = sudo $rsync $flags src/ dst"
}

# Should perform a copy from $1 to $2. Both will be directories. Neither
# will end with '/'. So you'll get something like:
# backup /Volumes/Src /Volumes/Dst/99-foo
backup () {
sudo $rsync $flags $1/ $2
}

0 comments on commit 61fce13

Please sign in to comment.