Line 85... |
Line 85... |
##############################################################################
|
##############################################################################
|
##
|
##
|
##############################################################################
|
##############################################################################
|
|
|
my $home = cwd();
|
my $home = cwd();
|
|
|
my $parser = XML::LibXML->new();
|
my $parser = XML::LibXML->new();
|
|
|
my $workspace_xml = $parser->parse_file("${home}/workspace.xml");
|
my $workspace_xml = $parser->parse_file("${home}/workspace.xml");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
my @repos =();
|
my @repos =();
|
my $repo;
|
my $repo;
|
|
|
|
|
foreach my $repo ($workspace_xml->findnodes('//socgen:workspace/socgen:external/socgen:repo'))
|
foreach my $repo ($workspace_xml->findnodes('//socgen:workspace/socgen:external/socgen:repo'))
|
{
|
{
|
my $repo_name = $repo->findnodes('./socgen:name/text()')->to_literal ;
|
my $repo_name = $repo->findnodes('./socgen:name/text()')->to_literal ;
|
my $repo_path = $repo->findnodes('./socgen:path/text()')->to_literal ;
|
my $repo_path = $repo->findnodes('./socgen:path/text()')->to_literal ;
|
print "cleaning $repo_name \n";
|
print "cleaning $repo_name \n";
|
Line 119... |
Line 107... |
|
|
|
|
|
|
my $build_dir;
|
my $build_dir;
|
my $yp_dir;
|
my $yp_dir;
|
my $ports_dir;
|
|
my $doc_dir;
|
my $doc_dir;
|
|
|
|
|
|
|
foreach my $repo ($workspace_xml->findnodes('//socgen:workspace'))
|
foreach my $repo ($workspace_xml->findnodes('//socgen:workspace'))
|
{
|
{
|
$build_dir = $repo->findnodes('./socgen:build_dir/text()')->to_literal ;
|
$build_dir = $repo->findnodes('./socgen:build_dir/text()')->to_literal ;
|
$yp_dir = $repo->findnodes('./socgen:yp_dir/text()')->to_literal ;
|
$yp_dir = $repo->findnodes('./socgen:yp_dir/text()')->to_literal ;
|
$ports_dir = $repo->findnodes('./socgen:ports_dir/text()')->to_literal ;
|
|
$doc_dir = $repo->findnodes('./socgen:doc_dir/text()')->to_literal ;
|
$doc_dir = $repo->findnodes('./socgen:doc_dir/text()')->to_literal ;
|
}
|
}
|
|
|
|
|
if(-e $build_dir)
|
if(-e $build_dir)
|
Line 149... |
Line 135... |
my $cmd = "rm -r ./${yp_dir} \n";
|
my $cmd = "rm -r ./${yp_dir} \n";
|
if(system($cmd)){};
|
if(system($cmd)){};
|
}
|
}
|
|
|
|
|
if(-e $ports_dir)
|
|
{
|
|
print "Removing $ports_dir \n";
|
|
my $cmd = "rm -r ./${ports_dir} \n";
|
|
if(system($cmd)){};
|
|
}
|
|
if(-e $doc_dir)
|
if(-e $doc_dir)
|
{
|
{
|
print "Removing $doc_dir \n";
|
print "Removing $doc_dir \n";
|
my $cmd = "rm -r ./${doc_dir} \n";
|
my $cmd = "rm -r ./${doc_dir} \n";
|
if(system($cmd)){};
|
if(system($cmd)){};
|