[mirrorbrain-commits] r7883 - /trunk/tools/null-rsync

From: <poeml_at_mirrorbrain.org>
Date: Tue, 01 Dec 2009 14:58:53 -0000
Author: poeml
Date: Tue Dec  1 15:58:51 2009
New Revision: 7883

URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=7883&view=rev
Log:
null-rsync:
- implement --exclude option, to be passed through to rsync

Modified:
    trunk/tools/null-rsync

Modified: trunk/tools/null-rsync
URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/tools/null-rsync?rev=7883&r1=7882&r2=7883&view=diff
==============================================================================
--- trunk/tools/null-rsync (original)
+++ trunk/tools/null-rsync Tue Dec  1 15:58:51 2009
_at_@ -97,6 +97,10 @@
 
     parser = OptionParser(usage=usage, version=version)
     #parser.disable_interspersed_args()
+
+    parser.add_option('--exclude',
+                      action='append', dest='excludes', metavar='PATTERN', default=[],
+                      help='exclude files matching PATTERN (passed through to rsync')
 
     parser.add_option('-q', '--quiet',
                       action='store_true', dest='quiet', default=False,
_at_@ -134,6 +138,9 @@
             rsync_src,
             rsync_dst ]
 
+    for i in options.excludes:
+        cmd.append('--exclude')
+        cmd.append(i)
 
     if not os.path.exists(rsync_dst):
         os.mkdir(rsync_dst)




_______________________________________________
mirrorbrain-commits mailing list
Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/

Note: To remove yourself from this list, send a mail with the content
 	unsubscribe
to the address mirrorbrain-commits-request_at_mirrorbrain.org
Received on Tue Dec 01 2009 - 14:58:56 GMT

This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT