Add 'sync-all grep'
authorJohan Tibell <johan.tibell@gmail.com>
Wed, 6 Apr 2011 09:39:29 +0000 (11:39 +0200)
committerJohan Tibell <johan.tibell@gmail.com>
Wed, 6 Apr 2011 09:39:29 +0000 (11:39 +0200)
sync-all

index caaed50..bd32e46 100755 (executable)
--- a/sync-all
+++ b/sync-all
@@ -354,6 +354,11 @@ sub scmall {
                     @scm_args = ("remote", "set-url", $branch_name, $path);
                 }
             }
                     @scm_args = ("remote", "set-url", $branch_name, $path);
                 }
             }
+            elsif ($command =~ /^grep$/) {
+              @scm_args = ("grep");
+              # Hack around 'git grep' failing if there are no matches
+              $ignore_failure = 1;
+            }
             else {
                 die "Unknown command: $command";
             }
             else {
                 die "Unknown command: $command";
             }
@@ -407,6 +412,7 @@ Supported commands:
  * remote add <branch-name>
  * remote rm <branch-name>
  * remote set-url [--push] <branch-name>
  * remote add <branch-name>
  * remote rm <branch-name>
  * remote set-url [--push] <branch-name>
+ * grep
 
 Available package-tags are:
 END
 
 Available package-tags are:
 END