head	1.4;
access;
symbols
	NEWHELM:1.1.1.1
	TIGRIS_NOV_12_2000:1.1.1
	OLDHELM:1.3.0.4
	TIGRIS_NOV_11_2000:1.3
	TIGRIS_SEP_13_2000:1.3.0.2
	TIGRIS_BASELINE:1.3;
locks; strict;
comment	@# @;


1.4
date	2000.11.16.04.31.15;	author edk;	state dead;
branches;
next	1.3;

1.3
date	2000.08.02.18.37.57;	author kmaples;	state Exp;
branches;
next	1.2;

1.2
date	2000.05.09.02.34.30;	author manoj;	state Exp;
branches;
next	1.1;

1.1
date	2000.04.29.00.04.10;	author jrobbins;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2000.11.12.21.17.34;	author dlr;	state Exp;
branches;
next	;


desc
@@


1.4
log
@these are obsoleted by anzu & eyebrowse
@
text
@#!/usr/bin/perl -w

# ================================================================
# Copyright (c) 2000 Collab.Net.  All rights reserved.
# 
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# 
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 
# 3. The end-user documentation included with the redistribution, if
# any, must include the following acknowlegement: "This product includes
# software developed by Collab.Net (http://www.Collab.Net/)."
# Alternately, this acknowlegement may appear in the software itself, if
# and wherever such third-party acknowlegements normally appear.
# 
# 4. The hosted project names must not be used to endorse or promote
# products derived from this software without prior written
# permission. For written permission, please contact info@@collab.net.
# 
# 5. Products derived from this software may not use the "Tigris" name
# nor may "Tigris" appear in their names without prior written
# permission of Collab.Net.
# 
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL COLLAB.NET OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# ====================================================================
# 
# This software consists of voluntary contributions made by many
# individuals on behalf of Collab.Net.
#


# ezmlm-projmail-delete
# --------------------
# Update/create mailing lists using ezmlm-idx (the qmail mailing list
# utility).
#
# Note that qmail must be set up correctly; see Helm::QmailAlias for
# more information on the requirements.
#
# We create mailing lists as both project-list@@domain.org and
# list@@project.domain.org. The cute thing is that due to the way
# qmail expands aliases, they both expand to .qmail-project-list, so
# we don't worry too much.
#
# For domain-wide lists, we use the NULL project in the table
# (project_mlists).


use strict;



# Process arguments
my $sandbox      = $ARGV[0];
my $project_name       = $ARGV[1];
my $domain_name        = $ARGV[2];
my $brand_name         = $ARGV[3];
my $list_name          = $ARGV[4];

my $ezmlmhome = "$sandbox/tigrisq";
my $ezmlminaccessible = "$ezmlmhome/inaccessible";
my $list_dir = "$ezmlmhome/$project_name-$list_name";
my $list_dot = ".qmail-$project_name-$list_name";

my $cmd = "unix command line";

print "ezmlm: remove dir for list $list_name in $project_name and replace it with a\n";
print "       sorry bounce script\n";


print "ezmlm: move dir for list $list_name in $project_name to an inaccessible location\n";

mkdir($ezmlminaccessible, 0777) or die "mkdir $ezmlminaccessible failed: $!";
rename ($list_dir, $ezmlminaccessible)
    or die "rename $list_dir -> $ezmlminaccessible failed: $!";

print "ezmlm: getting a list of dotfiles to move out of the way\n";
opendir (EZMLMHOME, $ezmlmhome) or die "opendir $ezmlmhome failed: $!";
my @@listing = readdir(EZMLMHOME) or die "readdir $ezmlmhome failed: $!";
my @@dot_files = grep /^$list_dot/, @@listing;
closedir EZMLMHOME or die "closedir $ezmlmhome failed: $!";

print "ezmlm: moving dotfiles out of the way\n";
foreach (@@dot_files) {
    rename ("$ezmlmhome/$_", "$ezmlminaccessible/$_") or die "rename failed: $!";
}

#TODO: sorry script?


@


1.3
log
@Minor syntax corrections.
@
text
@@


1.2
log
@Initial untested passes at ezmlm configuration
@
text
@d91 1
a91 1
mkpath($inaccessibledir) or die "mkpath $inaccessibledir failed: $!";
d96 1
a96 1
opendir EZMLMHOME $ezmlmhome or die "opendir $ezmlmhome failed: $!";
d98 1
a98 1
my @@dot_files = grep { /^$list_dot/ };
d103 1
a103 1
    rename "$ezmlmhome/$_" "$ezmlm_inaccessible/$_" or die "rename failed: $!";
@


1.1
log
@initial checkin
@
text
@d78 4
a81 4
my $ezmlmroot = "/home/tigrisq";
my $ezmlminaccessable = "$ezmlmroot/inaccessable";
my $list_dir = "$ezmlmroot/$project_name-$list_name";
my $list_dot = "$ezmlmroot/.qmail-$project_name-$list_name";
d89 1
a89 2
$cmd = "/bin/mv -f $list_dir $ezmlminaccessable";
print "Running: $cmd\n";
d91 14
a104 2
$cmd = "/bin/mv -f $list_dot* $ezmlminaccessable";
print "Running: $cmd\n";
@


1.1.1.1
log
@Merging newhelm tree into helm, as per IZ issue #557.  Previous major version of helm is tagged TIGRIS_NOV_11_2000.
@
text
@d78 4
a81 4
my $ezmlmhome = "$sandbox/tigrisq";
my $ezmlminaccessible = "$ezmlmhome/inaccessible";
my $list_dir = "$ezmlmhome/$project_name-$list_name";
my $list_dot = ".qmail-$project_name-$list_name";
d89 2
a90 1
print "ezmlm: move dir for list $list_name in $project_name to an inaccessible location\n";
d92 2
a93 14
mkdir($ezmlminaccessible, 0777) or die "mkdir $ezmlminaccessible failed: $!";
rename ($list_dir, $ezmlminaccessible)
    or die "rename $list_dir -> $ezmlminaccessible failed: $!";

print "ezmlm: getting a list of dotfiles to move out of the way\n";
opendir (EZMLMHOME, $ezmlmhome) or die "opendir $ezmlmhome failed: $!";
my @@listing = readdir(EZMLMHOME) or die "readdir $ezmlmhome failed: $!";
my @@dot_files = grep /^$list_dot/, @@listing;
closedir EZMLMHOME or die "closedir $ezmlmhome failed: $!";

print "ezmlm: moving dotfiles out of the way\n";
foreach (@@dot_files) {
    rename ("$ezmlmhome/$_", "$ezmlminaccessible/$_") or die "rename failed: $!";
}
@


