Changeset 623
- Timestamp:
- Oct 16, 2002, 8:08:34 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/technical/common/build/buildall.pl
r619 r623 2 2 # automatisches buildskript fuer smartclient 3 3 # liest die konfiguration aus der mit -b übergebenen Datei 4 # $Id: buildall.pl,v 1.1 4 2002/10/10 15:01:08joergs Exp $4 # $Id: buildall.pl,v 1.15 2002/10/16 18:08:34 joergs Exp $ 5 5 # Philipp Storz, SuSE Linux AG 6 6 # pstorz@suse.de 7 7 8 use Getopt::Std; 9 use File::stat; 10 use File::Basename; 8 11 9 12 … … 59 62 write; 60 63 } 61 print "\n\n\nATTENTION: the srpms from the directory external/SuSE and external/cpan must have been extracted before!\n"; 62 print "To build srpms execute the extract_srpm.sh script in either directory!\n\n\n"; 64 63 65 print 'Are all the srpms extracted and all options OK? (y/n)'; 64 66 … … 87 89 tr/\//\_/; 88 90 $logfilename = $_.".$ArrayofBuilds[$i][1].log"; 91 92 93 my $build_log="| tee $logfilename"; 94 my $build_cmd="cd $mypath && $build"; 95 96 # open a xterm to display build output 97 if ($opt_x) 98 { 99 system "xterm -T \"build log for PACKET: $mypath ARCH:$ArrayofBuilds[$i][1] \" -e less +F $workdir/$mypath/$logfilename &"; 89 100 print "++++++++++++++++++++++++++++++++++++++++++\n"; 90 print "executing command: cd $mypath; $build 2>&1 > $logfilename\n"; 101 $build_log=">$logfilename 2>&1"; 102 } 103 104 # if mypath is not a directory, so it is a src.rpm (hopefully) 105 if( ! -d $mypath ) { 106 my $base = basename($mypath); 107 my $dir = dirname($mypath); 108 $build_cmd = "cd $dir && $build $base-*rpm"; 109 } 110 111 print "++++++++++++++++++++++++++++++++++++++++++\n"; 91 112 print "BUILD_DIST ist $ENV{'BUILD_DIST'}\n"; 92 113 print "BUILD_MODE ist $ENV{'BUILD_MODE'}\n"; 93 94 print " writing logfile to $logfilename \n\n\n";114 print "executing build command:\n"; 115 print "$build_cmd $build_log\n"; 95 116 print "you can watch building with following command: \n"; 96 117 $workdir=`pwd`; 97 118 chomp $workdir; 98 print "less +F $workdir/$mypath/$logfilename\n ";119 print "less +F $workdir/$mypath/$logfilename\n\n"; 99 120 121 $retval = system "$build_cmd $build_log"; 100 122 101 if ($opt_x) 102 { 103 system "xterm -T \"build log for PACKET: $mypath ARCH:$ArrayofBuilds[$i][1] \" -e less +F $workdir/$mypath/$logfilename &"; 104 print "++++++++++++++++++++++++++++++++++++++++++\n"; 105 $retval = system "cd $mypath && $build >$logfilename 2>&1"; 106 } 107 else 108 { 109 $retval = system "cd $mypath && $build | tee $logfilename"; 110 } 111 112 113 if ($retval == 0) 123 if ( $retval == 0 ) 114 124 { 115 125 $ArrayofBuilds[$i][3]= "SUCCESS $ArrayofBuilds[$i][0]: OK"; … … 118 128 print"****** ******\n"; 119 129 } 120 else130 else 121 131 { 122 132 $ArrayofBuilds[$i][3]="ERROR $ArrayofBuilds[$i][0]: *FAILED*\n"; … … 125 135 print"****** ******\n"; 126 136 } 127 128 137 } 129 138 … … 145 154 } 146 155 147 148 149 150 156 print "buildall.pl terminated\n";
Note:
See TracChangeset
for help on using the changeset viewer.