mhonarc-commits
[Top] [All Lists]

CVS: mharc/bin apply-config,1.6,1.7

2002-05-30 12:30:07
Update of /cvsroot/mhonarc/mharc/bin
In directory subversions:/tmp/cvs-serv17542/bin

Modified Files:
	apply-config 
Log Message:
* apply-config: Modified interaction with File::Find module so it
  will work with older versions that do not support the -no_chdir
  option.


Index: apply-config
===================================================================
RCS file: /cvsroot/mhonarc/mharc/bin/apply-config,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** apply-config	12 Mar 2002 22:30:26 -0000	1.6
--- apply-config	30 May 2002 18:38:42 -0000	1.7
***************
*** 4,7 ****
--- 4,8 ----
  ##	$Id$
  ##  Description:
+ ##	Processes all '.in' template files.
  ##--------------------------------------------------------------------------##
  ##  Copyright (C) 2002	Earl Hood <earl(_at_)earlhood(_dot_)com>
***************
*** 94,108 ****
    }
  
!   my $file = $File::Find::name;
    print qq/Checking "$File::Find::name"...\n/  if $debug;
    if ($file =~ s/\.dist$//) {
      if (!$clean) {
        if (! -e $file) {
! 	run_prg('/bin/cp', $File::Find::name, $file);
  	run_prg('/bin/chmod', 'u+w', $file);
        }
      }
      $done{$File::Find::name} = 1;
!     $done{$file} = 1;
    }
  
--- 95,109 ----
    }
  
!   my $file = $_;
    print qq/Checking "$File::Find::name"...\n/  if $debug;
    if ($file =~ s/\.dist$//) {
      if (!$clean) {
        if (! -e $file) {
! 	run_prg('/bin/cp', $_, $file);
  	run_prg('/bin/chmod', 'u+w', $file);
        }
      }
      $done{$File::Find::name} = 1;
!     $done{"$File::Find::dir/$file"} = 1;
    }
  
***************
*** 117,127 ****
    }
  
!   print qq/Processing "$file"\n/  if $verbose;
    if (!$noact) {
      local(*IN, *OUT);
      open(IN, $file) ||
! 	die qq/ERROR: Unable to open "$file": $!\n/;
      open(OUT, ">$file_out") ||
! 	die qq/ERROR: Unable to create "$file_out": $!\n/;
  
      my($line);
--- 118,128 ----
    }
  
!   print qq|Processing "$File::Find::dir/$file"\n|  if $verbose;
    if (!$noact) {
      local(*IN, *OUT);
      open(IN, $file) ||
! 	die qq|ERROR: Unable to open "$File::Find::dir/$file": $!\n|;
      open(OUT, ">$file_out") ||
! 	die qq|ERROR: Unable to create "$File::Find::dir/$file_out": $!\n|;
  
      my($line);
***************
*** 142,146 ****
  }
  find({ wanted => \&wanted,
!        no_chdir => 1 },
       @ARGV);
  
--- 143,147 ----
  }
  find({ wanted => \&wanted,
!      },
       @ARGV);
  
***************
*** 197,201 ****
  
  Print out alot of information on what is going on.  This options
! prints out more information than C<-debug>.
  
  =item -n
--- 198,202 ----
  
  Print out alot of information on what is going on.  This options
! prints out more information than C<-verbose>.
  
  =item -n

---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHONARC-DEV