]> git.madduck.net Git - code/myrepos.git/blobdiff - mr

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

add "mr -q" to shut up all the repository related info
[code/myrepos.git] / mr
diff --git a/mr b/mr
index 079af5273eb5c48fd56247c69f1f03e0aa905be3..a03856acab61b768f4e8cdedd5ed5589b9097a5f 100755 (executable)
--- a/mr
+++ b/mr
@@ -147,6 +147,10 @@ Use the specified mrconfig file. The default is B<~/.mrconfig>
 
 Be verbose.
 
 
 Be verbose.
 
+=item -q
+
+Be quiet.
+
 =item -s
 
 Expand the statistics line displayed at the end to include information
 =item -s
 
 Expand the statistics line displayed at the end to include information
@@ -316,6 +320,7 @@ use constant {
 # configurables
 my $config_overridden=0;
 my $verbose=0;
 # configurables
 my $config_overridden=0;
 my $verbose=0;
+my $quiet=0;
 my $stats=0;
 my $max_depth;
 my $no_chdir=0;
 my $stats=0;
 my $max_depth;
 my $no_chdir=0;
@@ -462,12 +467,12 @@ sub action { #{{{
        }
        else {
                if (! $no_chdir) {
        }
        else {
                if (! $no_chdir) {
-                       print "mr $action: $topdir$subdir\n";
+                       print "mr $action: $topdir$subdir\n" unless $quiet;
                }
                else {
                        my $s=$directory;
                        $s=~s/^\Q$topdir$subdir\E\/?//;
                }
                else {
                        my $s=$directory;
                        $s=~s/^\Q$topdir$subdir\E\/?//;
-                       print "mr $action: $topdir$subdir (in subdir $s)\n";
+                       print "mr $action: $topdir$subdir (in subdir $s)\n" unless $quiet;
                }
                $command="set -e; ".$lib.
                        "my_action(){ $command\n }; my_action ".
                }
                $command="set -e; ".$lib.
                        "my_action(){ $command\n }; my_action ".
@@ -605,10 +610,10 @@ sub showstats { #{{{
                showstat($#ok+1, "ok", "ok"),
                showstat($#failed+1, "failed", "failed"),
                showstat($#skipped+1, "skipped", "skipped"),
                showstat($#ok+1, "ok", "ok"),
                showstat($#failed+1, "failed", "failed"),
                showstat($#skipped+1, "skipped", "skipped"),
-       ).")\n";
+       ).")\n" unless $quiet;
        if ($stats) {
                if (@skipped) {
        if ($stats) {
                if (@skipped) {
-                       print "mr $action: (skipped: ".join(" ", @skipped).")\n";
+                       print "mr $action: (skipped: ".join(" ", @skipped).")\n" unless $quiet;
                }
                if (@failed) {
                        print STDERR "mr $action: (failed: ".join(" ", @failed).")\n";
                }
                if (@failed) {
                        print STDERR "mr $action: (failed: ".join(" ", @failed).")\n";
@@ -1054,6 +1059,7 @@ sub getopts { #{{{
                "d|directory=s" => sub { $directory=abs_path($_[1]) },
                "c|config=s" => sub { $ENV{MR_CONFIG}=$_[1]; $config_overridden=1 },
                "v|verbose" => \$verbose,
                "d|directory=s" => sub { $directory=abs_path($_[1]) },
                "c|config=s" => sub { $ENV{MR_CONFIG}=$_[1]; $config_overridden=1 },
                "v|verbose" => \$verbose,
+               "q|quiet" => \$quiet,
                "s|stats" => \$stats,
                "n|no-recurse:i" => \$max_depth,
                "j|jobs:i" => \$jobs,
                "s|stats" => \$stats,
                "n|no-recurse:i" => \$max_depth,
                "j|jobs:i" => \$jobs,