## OpenCA - CA Command
## (c) 1998-2001 by OpenCA Group
##
##   File Name: nodeDownloadBP
##     Version: $Revision: 1.3 $
##       Brief: imports batchprocessors
## Description: imports the data from the batchprocessors from a removable media

require "$common_libs/export-import.lib";

sub cmdNodeDownloadBP {

	print startLogPage ( gettext ("Importing the data from the batchprocessors from a higher level of the hierarchy ...") );

	my $tmp = createDirectory ();
	if (not eximIODownload ($tmp)) {
		print addPreLogSection ("<FONT COLOR=#FF0000>".
			gettext ("Cannot extract archive from import device!").
			"</FONT>");
		print closeLogSection ();
		print closeLogPage ();
		return undef;
	}
	eximDownloadBP     ( $tmp );
	eximDownloadCommit ( $tmp );
	removeDirectory    ( $tmp );

	closePage ();

	return 1;
}

1;
