#! /tools/bin/perl

use File::Find; 

open (F,">dirlist30");
open (G,">dirlist30_images");
open (H,">dirlist30_e2demo");
find(\&makedirlist, "/usr/www/push/temp/www");
close (F);
close (G);
close (H);

sub makedirlist
{
my $fullpath = "$File::Find::name";
if (( -d "$_" ) and ( $_ ne "CVS")) {
	$fullpath =~ /\/usr\/www\/push\/temp\/(.*)/;
	$stuff=$1;
	if ($fullpath =~ m/docroot\/images/) {
		print G "$stuff\n";
	} else {
		print H "$stuff\n";
		if ($fullpath =~ m/sandbox/) {
			print "Ignoring this dir because it is in sandbox: $stuff\n";
		} else {
			print F "$stuff\n";
		} # End of if
	} # End of if
} # End of if
} # End of makedirlist
