I would like to make a small modification to my 'pkgacct' file, I want it to copy only the first directory of public_html (with it's files)and the 'images' directory but it should not copy recursively any further directories within public_html. This is the only change I want, I do want it to follow the rest of the script as it is.

the current settings in that script is:

print "Copying homedir....";
open(NFILES,">${tarroot}/${prefix}${user}/nobodyfiles");
open(FIND,"find $homedir -user nobody|");
while (<FIND>) {
s/^$homedir//g;
print NFILES;
}
close(FIND);
close(NFILES);


if ($pid = fork()) {
my $dotcount = 5;
while(waitpid($pid,1) != -1) {
if (!$isbackup && $dotcount % 5 == 0) {
print ".........\n";
}
sleep(1);
$dotcount++;
}
} else {
if ($isbackup) {
if ($isuserbackup) {
system("rsync",${rsyncopts},"--exclude=/backup-*_*-*-*_${user}*","${homedir}/","${tarroot}/${prefix}${user}/homedir");
} else {
if ($isinc) {
system("rsync",${rsyncopts},"--delete","$homedir/","${tarroot}/${prefix}${user}/homedir");
} else {
if ($system =~ /freebsd/i) {
system("cp","-Rp","$homedir","${tarroot}/${prefix}${user}/homedir");
} else {
system("cp","-a","$homedir","${tarroot}/${prefix}${user}/homedir");
}
}
}
} else {
if ($system =~ /freebsd/i) {
system("cp","-Rp","$homedir","${tarroot}/${prefix}${user}/homedir");
} else {
system("cp","-a","$homedir:q!","${tarroot}/${prefix}${user}/homedir");
}
}
exit();
}
print "Done\n";
Now I don't know anything in perl or whatever that is written in, basically instead of copying the full 'homedir' I want it to copy only (within public_html) the files contained inthat folder and teh folder images but nothing else. (outside of the public_html I want it to copy everything as untill now - mail etc. - )


thanx for any help in advance