add --no-<tag>, so e.g. we can omit DPH with --no-dph
authorSimon Marlow <marlowsd@gmail.com>
Fri, 15 Apr 2011 08:35:24 +0000 (09:35 +0100)
committerSimon Marlow <marlowsd@gmail.com>
Fri, 15 Apr 2011 09:50:08 +0000 (10:50 +0100)
sync-all

index 02ac521..6ff06cc 100755 (executable)
--- a/sync-all
+++ b/sync-all
@@ -311,6 +311,9 @@ sub scmall {
             elsif ($command =~ /^(?:g|ge|get)$/) {
                 # Skip any repositories we have not included the tag for
                 if (not defined($tags{$tag})) {
             elsif ($command =~ /^(?:g|ge|get)$/) {
                 # Skip any repositories we have not included the tag for
                 if (not defined($tags{$tag})) {
+                    $tags{$tag} = 0;
+                }
+                if ($tags{$tag} == 0) {
                     next;
                 }
                 
                     next;
                 }
                 
@@ -484,9 +487,11 @@ sub main {
         }
         # --<tag> says we grab the libs tagged 'tag' with
         # 'get'. It has no effect on the other commands.
         }
         # --<tag> says we grab the libs tagged 'tag' with
         # 'get'. It has no effect on the other commands.
-        elsif ($arg =~ m/^--/) {
-            $arg =~ s/^--//;
-            $tags{$arg} = 1;
+        elsif ($arg =~ m/^--no-(.*)$/) {
+            $tags{$1} = 0;
+        }
+        elsif ($arg =~ m/^--(.*)$/) {
+            $tags{$1} = 1;
         }
         else {
             unshift @_, $arg;
         }
         else {
             unshift @_, $arg;