head	1.5;
access;
symbols;
locks; strict;
comment	@# @;


1.5
date	2001.06.08.23.10.15;	author stephane;	state Exp;
branches;
next	1.4;

1.4
date	2001.05.31.22.32.07;	author dlr;	state Exp;
branches;
next	1.3;

1.3
date	2001.05.31.21.53.05;	author ms;	state Exp;
branches;
next	1.2;

1.2
date	2001.05.31.20.47.23;	author dlr;	state Exp;
branches;
next	1.1;

1.1
date	2001.05.31.18.32.04;	author dlr;	state Exp;
branches;
next	;


desc
@@


1.5
log
@Changed 'i' to '$i' in for loop condition.
@
text
@#!/usr/bin/perl
#
# Checks out web content from CVS and publishes it to the document root.

# The version control command to use to checkout modules.
my @@VC_CHECKOUT = ('cvs', '-d', '__SANDBOX__/data/helm/cvs/repository', 'co');

# The modules to checkout from version control.
my @@MODULES = ('look', 'www');

# Journey to the document root.
chdir('__SANDBOX__/data/helm/htdoc');

# Checkout each module under a temporary name, adding to a list of these
# names as we go.
my @@fresh_modules = ();
foreach (@@MODULES)
{
    my $tmp = $_ . '.tmp';
    push(@@fresh_modules, $tmp);
    system('rm', '-rf', $tmp);
    if (system(@@VC_CHECKOUT, '-d', $tmp, $_) != 0)
    {
        print "Error checking out module '$_': $!\n";
    }
}

# Now that we have all the new modules checked out, replace the old with
# the new.
for (my $i = 0; $i < scalar(@@MODULES); $i++)
{
    if (system('mv', '-f', $fresh_modules[$i], $MODULES[$i]) != 0)
    {
        print "Error replacing '$MODULES[$i]' with '$fresh_modules[$i]': $!\n";
    }
}
@


1.4
log
@Quote entity which caused the error.
@
text
@d30 1
a30 1
for (my $i = 0; i < scalar(@@MODULES); $i++)
@


1.3
log
@minor fixes
@
text
@d24 1
a24 1
        print "Error checking out module $_: $!\n";
@


1.2
log
@Rewrote this shell script in Perl to handle stack's suggestion of
removing any pre-existing code to avoid merge conflicts on VC check
out (helm.tigris.org IZ #1).
@
text
@d19 1
a19 1
    my $tmp = $_ + '.tmp';
d24 1
a24 1
        print "Error checking out module '$m': $!\n";
@


1.1
log
@This is the start of helm.tigris.org IZ #1.
@
text
@d1 3
a3 1
#!/bin/sh
d5 2
a6 1
cd __SANDBOX__/data/helm/htdoc
d8 29
a36 1
cvs -d __SANDBOX__/data/helm/cvs/repository co look www 
@

