Permalink
Browse files

Add a copier for fink's rsync

Written by John Lillibridge.
  • Loading branch information...
1 parent c5ee72a commit 3bd61f60fa4ac0a876f8721f904aac74d6930b56 @n8gray committed Sep 12, 2011
Showing with 25 additions and 0 deletions.
  1. +25 −0 copiers.d/16-rsync-fink.cp
View
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+rsync=/sw/bin/rsync
+
+flags="-aNAHXx --fileflags --force-change"
+
+# 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 3bd61f6

Please sign in to comment.