Add 'sync-all grep'
[ghc-hetmet.git] / sync-all
index b202fe7..bd32e46 100755 (executable)
--- a/sync-all
+++ b/sync-all
@@ -290,7 +290,7 @@ sub scmall {
             }
 
             # Work out the arguments we should give to the SCM
-            if ($command =~ /^(?:w|wh|wha|what|whats|whatsn|whatsne|whatsnew)$/) {
+            if ($command =~ /^(?:w|wh|wha|what|whats|whatsn|whatsne|whatsnew|status)$/) {
                 @scm_args = (($scm eq "darcs" and "whatsnew")
                           or ($scm eq "git" and "status"));
                 
@@ -354,6 +354,11 @@ sub scmall {
                     @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";
             }
@@ -407,6 +412,7 @@ Supported commands:
  * remote add <branch-name>
  * remote rm <branch-name>
  * remote set-url [--push] <branch-name>
+ * grep
 
 Available package-tags are:
 END