]> diplodocus.org Git - minc/commitdiff
Get rid of dryrun.log: in -n mode, don't log at all. I don't think
authorepg <>
Tue, 20 Sep 2005 23:59:34 +0000 (23:59 +0000)
committerepg <>
Tue, 20 Sep 2005 23:59:34 +0000 (23:59 +0000)
anyone ever actually used the dryrun log, and if we get rid of it,
then minc -n becomes a better mdfrm.

minc

diff --git a/minc b/minc
index ca4b9b3..3011834 100755 (executable)
--- a/minc
+++ b/minc
@@ -152,10 +152,6 @@ by lukem's B<new(1)> (XXX need a link).
 
 Where B<minc> logs what it does, unless in -n mode.
 
-=item `mhpath +`/logs/dryrun.log
-
-Where B<minc> logs what it would do; used in -n mode.
-
 =item `mhpath +`/.minc.context
 
 B<minc> uses this file for context (i.e. current folder) instead of
@@ -178,16 +174,11 @@ our $SCAN_P_MESSAGE = 0.0625;
 our $SCAN_P_FROM = 0.175;
 
 my $mh;
-my $logfile;
 
 $mh = `mhpath +`;
 chomp($mh);
 
-if ($run) {
-    $logfile = $mh . '/logs/minc.log';
-} else {
-    $logfile = $mh . '/logs/dryrun.log';
-}
+my $logfile = $mh . '/logs/minc.log';
 
 $ENV{"MHCONTEXT"} = $mh . '/.minc.context';
 
@@ -196,6 +187,8 @@ $ENV{"MHCONTEXT"} = $mh . '/.minc.context';
 # Logging
 
 sub mylog {
+    $run or return;
+
     my $timestamp = strftime('%b %e %H:%M:%S', localtime);
     my $msg;
     foreach my $part (@_) {