source: trunk/technical/common/build/buildall.pl@ 592

Last change on this file since 592 was 589, checked in by pstorz, on Sep 3, 2002 at 4:13:10 PM

Init

File size: 1.7 KB
Line 
1#!/usr/bin/perl -w
2# automatisches buildskript fuer smartclient
3# liest die konfiguration aus der mit -b übergebenen Datei
4# $Id: buildall.pl,v 1.1 2002/09/03 14:13:10 pstorz Exp $
5use Getopt::Std;
6
7# Programmoptionen: -b (buildlist)
8
9my $smartclient_root="../../"; # Pfad, zu dem die Pfade in buildlist stehen
10my $build = "/home/pstorz/bin/build.sh";
11our ($opt_b);
12my @ArrayofBuilds;
13getopts('b:');
14
15(open(BUILDLIST,$opt_b)) || die "Die Buildlist $opt_b konnte nicht gefunden werden";
16
17
18while (<BUILDLIST>) #Buildlist parsen
19 {
20 next if (/^\#.*$/);
21 if (/([\w\/]+)\s*:([\/\w\-\+\.]+)\s+:?((\s*\-\-\w*)*)$/)
22 {
23 ($dir, $arch, $opt) = ($1, $2, $3);
24 chomp ($arch);
25 @build=($dir, $arch, $opt);
26 push @ArrayofBuilds, [@build];
27 }
28 }
29
30for $i (0 .. $#ArrayofBuilds)
31 {
32 print("$ArrayofBuilds[$i][0]\t$ArrayofBuilds[$i][1]\t$ArrayofBuilds[$i][2]\n");
33 $mypath = $smartclient_root.$ArrayofBuilds[$i][0];
34
35 if ($ArrayofBuilds[$i][2])
36 {
37 $ENV{'BUILD_MODE'}=$ArrayofBuilds[$i][2];
38 }
39 else
40 {
41 $ENV{'BUILD_MODE'}="--clean";
42 }
43 $ENV{'BUILD_DIST'}=$ArrayofBuilds[$i][1];
44# system "./test.sh";
45 $_=$ArrayofBuilds[$i][0];
46 print "$_ \n";
47 tr/\//\_/;
48 $logfilename = $_.".log";
49 print "++++++++++++++++++++++++++++++++++++++++++\n";
50 print "executing command: cd $mypath; $build 2>&1 |tee $logfilename\n";
51 print "BUILD_DIST ist $ENV{'BUILD_DIST'}\n";
52 print "BUILD_MODE ist $ENV{'BUILD_MODE'}\n";
53
54 print "writing logfile to $logfilename \n";
55 print "++++++++++++++++++++++++++++++++++++++++++\n";
56# system "cd $mypath; $build 2>&1 > $logfilename;"
57 system "cd $mypath; $build 2>&1 |tee $logfilename;"
58}
59
60print "buildall.pl terminated\n";
61
62
63
Note: See TracBrowser for help on using the repository browser.