#!/usr/bin/perl -w

$bucket = shift;
@files = ();
chomp( $cwd = `pwd` );
while( my $f = shift )
{
	$f = $cwd . "/" . $f if ( $f =~ /^[^\/]/ );
	push( @files, $f );
}
chdir "/usr/share/popfile";
$ENV{'POPFILE_ROOT'} = "/usr/share/popfile";
$ENV{'POPFILE_USER'} = "/var/lib/popfile";
umask 0027;
exec "/usr/share/popfile/insert.pl", $bucket || "", @files;

