#!/usr/bin/env perl

my $resultdir = shift;
my $project = shift;

print "Pushdata for project<$project> in directory<$resultdir>\n";
system("date");

if($resultdir =~ /^.*\/(\d+)\s*$/) {
	system("pwd");
	chdir($resultdir);
	chdir("..");
	system("pwd;ls");
	my $name = $resultdir . "/$project" . $1 . ".tar.gz";
	print "creating $name";
	system("tar -zcvf $name $1");
} else {
	print "Bad format push target<$resultdir>\n";
}
system("date");
