[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.2 - (download) (as text) (annotate)
Mon Sep 20 19:40:19 2010 UTC (9 years, 8 months ago) by olson
Branch: MAIN
CVS Tags: mgrast_dev_05262011, mgrast_dev_04082011, rast_rel_2010_0928, mgrast_dev_06072011, mgrast_dev_02212011, rast_rel_2010_1206, mgrast_release_3_0, mgrast_dev_03252011, rast_rel_2011_0119, mgrast_release_3_0_4, mgrast_release_3_0_2, mgrast_release_3_0_3, mgrast_release_3_0_1, mgrast_dev_03312011, mgrast_release_3_1_0, mgrast_dev_04132011, mgrast_dev_04012011, myrast_33, mgrast_dev_04052011, mgrast_dev_02222011
Changes since 1.1: +21 -3 lines
mods for building myRAST

#
# 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);
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