[Bio] / FigKernelScripts / build_sas_distro_from_cvs.pl Repository:
ViewVC logotype

View of /FigKernelScripts/build_sas_distro_from_cvs.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (download) (as text) (annotate)
Wed Jun 8 19:03:12 2011 UTC (8 years, 11 months ago) by devoid
Branch: MAIN
Changes since 1.2: +1 -1 lines
Adding support for recursivly searching for sas components.
Neccesary for ModelSEED sas and dtr components.
Modified Files:
	build_dtr_distro.pl build_sas_distro.pl
 	build_sas_distro_from_cvs.pl

#
# Check out a clean copy of the code in CVS, then run build_sas_distro against it to generate
# clean distribution.
#

use strict;
use FIG;
use FIG_Config;
use Cwd;

use Getopt::Long;

my $build_dtr;
my $rc = GetOptions(dtr => \$build_dtr);

$rc && @ARGV == 1 or die "usage: $0 [--dtr] output-tarfile\n";

my $output_tarfile = shift;

my $modules = "/home/olson/Build/perl-packages";
my $temp = "$FIG_Config::temp/sas_build.$$";
my $distro_dir = "$temp/sas";

&FIG::verify_dir($temp);
&FIG::verify_dir($distro_dir);

my $here = getcwd();

chdir($temp);

my @cvs_modules = qw(FigKernelScripts FigKernelPackages ModelSEEDScripts ModelSEED);
my $cmd;
if ($build_dtr)
{
    push(@cvs_modules, 'DesktopRast');
    $cmd = "build_dtr_distro";
}
else
{
    push(@cvs_modules, 'FigWebServices');
    $cmd = "build_sas_distro";
}

my $rc = system('cvs -d :pserver:anonymous@biocvs.mcs.anl.gov:/disks/cvs/bio export -D now ' .
		join(" ", @cvs_modules) . " > cvs_checkout.stdout");
if ($rc != 0)
{
    die "cvs failed with rc=$rc\n";
}

chdir($here);

$rc = system("$FIG_Config::bin/$cmd", "--source", $temp, $distro_dir, $modules);

if ($rc != 0)
{
    die "build_sas_distro failed with rc=$rc\n";
}

$rc = system("tar", "-c", "-C", $distro_dir, "-z", "-f", $output_tarfile, ".");
if ($rc != 0)
{
    die "tar failed with rc=$rc\n";
}

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3