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

Annotation of /FigKernelScripts/build_sas_distro_from_cvs.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (view) (download) (as text)

1 : olson 1.1 #
2 :     # Check out a clean copy of the code in CVS, then run build_sas_distro against it to generate
3 :     # clean distribution.
4 :     #
5 :    
6 :     use strict;
7 :     use FIG;
8 :     use FIG_Config;
9 :     use Cwd;
10 :    
11 : olson 1.2 use Getopt::Long;
12 :    
13 :     my $build_dtr;
14 :     my $rc = GetOptions(dtr => \$build_dtr);
15 :    
16 :     $rc && @ARGV == 1 or die "usage: $0 [--dtr] output-tarfile\n";
17 : olson 1.1
18 :     my $output_tarfile = shift;
19 :    
20 :     my $modules = "/home/olson/Build/perl-packages";
21 :     my $temp = "$FIG_Config::temp/sas_build.$$";
22 :     my $distro_dir = "$temp/sas";
23 :    
24 :     &FIG::verify_dir($temp);
25 :     &FIG::verify_dir($distro_dir);
26 :    
27 :     my $here = getcwd();
28 :    
29 :     chdir($temp);
30 :    
31 : devoid 1.3 my @cvs_modules = qw(FigKernelScripts FigKernelPackages ModelSEEDScripts ModelSEED);
32 : olson 1.2 my $cmd;
33 :     if ($build_dtr)
34 :     {
35 :     push(@cvs_modules, 'DesktopRast');
36 :     $cmd = "build_dtr_distro";
37 :     }
38 :     else
39 :     {
40 :     push(@cvs_modules, 'FigWebServices');
41 :     $cmd = "build_sas_distro";
42 :     }
43 :    
44 : olson 1.1 my $rc = system('cvs -d :pserver:anonymous@biocvs.mcs.anl.gov:/disks/cvs/bio export -D now ' .
45 : olson 1.2 join(" ", @cvs_modules) . " > cvs_checkout.stdout");
46 : olson 1.1 if ($rc != 0)
47 :     {
48 :     die "cvs failed with rc=$rc\n";
49 :     }
50 :    
51 :     chdir($here);
52 :    
53 : olson 1.2 $rc = system("$FIG_Config::bin/$cmd", "--source", $temp, $distro_dir, $modules);
54 : olson 1.1
55 :     if ($rc != 0)
56 :     {
57 :     die "build_sas_distro failed with rc=$rc\n";
58 :     }
59 :    
60 :     $rc = system("tar", "-c", "-C", $distro_dir, "-z", "-f", $output_tarfile, ".");
61 :     if ($rc != 0)
62 :     {
63 :     die "tar failed with rc=$rc\n";
64 :     }

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3