Great Circle Associates Majordomo-Workers
(October 1995)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Archive Directories
From: cmh @ spiff . ccs . carleton . ca (Colin Henein)
Date: Mon, 9 Oct 1995 15:22:14 -0400 (EDT)
To: majordomo-workers @ greatcircle . com

I'm upgrading majordomo from 1.60 to 1.93. (yes, its a big jump)

I got tired of editing the majordomo.cf file to add a new archive
directory everytime I added a new list (since I want them all in their
own directories).

I changed archive2.pl so that it allows you to specify a directory of
the form "/foo/bar/quux*" in the array of directories in majordomo.cf.
archive2.pl takes this  to mean that it should expect ONE (and only
one) subdirectory after /foo/bar/quux and accept it as a valid archive
directory. 

Thus 
/foo/bar/quux/xyzzy is legal, but
/foo/bar/quux is not, and neither is
/foo/bar/quux/xyzzy/biff


Here is the patch to apply if you're interested in using this. (Note,
its fairly stupid about this, if you ever wanted to have a directory
that ended with a * you'd be out of luck. How many people do that
anyway?)

*** Tools/archive2.pl	Mon Oct  9 12:03:01 1995
--- archive2.pl	Mon Oct  9 11:13:49 1995
***************
*** 96,104 ****
  
  undef $valid_dir;
  foreach $dir (@archive_dirs) {
!     if ($dir eq $dirname) {
!         $valid_dir = $dir;	
!         last;
      }
  }
  
--- 96,112 ----
  
  undef $valid_dir;
  foreach $dir (@archive_dirs) {
!     if (substr($dir, -1) eq '*') {
! 	$dir =~ s/\*$//;
! 	if ($dirname =~ m|^$dir/[^/]+$|) {
! 	    $valid_dir = $dirname;
! 	    last;
! 	}
!     } else {
! 	if ($dir eq $dirname) {
! 	    $valid_dir = $dir;	
! 	    last;
! 	}
      }
  }
  

-- 
=================================+=================================
Colin Henein (Code guy)          | 3rd year Computer Science Co-op.
cmh@ccs.carleton.ca              | Chief Informatics Officer,
root@journal.biology.carleton.ca | COBRA (aka. Orange-Carb)




Follow-Ups:
Indexed By Date Previous: Re: majordomo
From: "Jonathan M. Bresler" <jmb@kryten.atinc.com>
Next: Re: Archive Directories
From: dwolfe@risc.sps.mot.com (Dave Wolfe)
Indexed By Thread Previous: Re: majordomo
From: -Vince- <vince@apollo.COSC.GOV>
Next: Re: Archive Directories
From: dwolfe@risc.sps.mot.com (Dave Wolfe)

Google
 
Search Internet Search www.greatcircle.com