Changeset 66 in ProjectBuilder
- Timestamp:
- Aug 31, 2007, 1:19:46 PM (17 years ago)
- Location:
- 0.5/pb
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
0.5/pb/bin/pb
r63 r66 41 41 my $pbdate = strftime("%Y-%m-%d", @date); 42 42 43 getopts('hl:p:q tv',\%opts);43 getopts('hl:p:qr:tv',\%opts); 44 44 45 45 version_init(); … … 70 70 die syntax() if (not defined $action); 71 71 72 # Handle root of the project if defined 73 if (defined $opts{'r'}) { 74 $ENV{'PBROOT'} = $opts{'r'}; 75 } 72 76 # Handles project name if any 73 77 if (defined $opts{'p'}) { … … 253 257 print $LOG "Under $ENV{'PBDESTDIR'}/$pbpkg-$pbver.tar.gz\n" if ($debug >= 0); 254 258 # Keep track of what is generated for build2pkg default 255 open(LAST,"> $ENV{'PB DESTDIR'}/LAST") || die "Unable to create $ENV{'PBDESTDIR'}/LAST";259 open(LAST,"> $ENV{'PBTOPDIR'}/LAST") || die "Unable to create $ENV{'PBTOPDIR'}/LAST"; 256 260 print LAST "$pbver-$pbtag\n"; 257 261 close(LAST); … … 261 265 my $vertag = shift @ARGV; 262 266 if (not defined $vertag) { 263 open(LAST,"$ENV{'PB DESTDIR'}/LAST") || die "Unable to open $ENV{'PBDESTDIR'}/LAST\nYou may want to precise as parameter version-tag";267 open(LAST,"$ENV{'PBTOPDIR'}/LAST") || die "Unable to open $ENV{'PBTOPDIR'}/LAST\nYou may want to precise as parameter version-tag"; 264 268 $vertag = <LAST>; 265 269 chomp($vertag); … … 279 283 foreach my $pbpkg (@pkgs) { 280 284 my $src="$ENV{'PBDESTDIR'}/$pbpkg-$pbver.tar.gz"; 281 print $LOG " Handling source file$src\n" if ($debug >= 0);285 print $LOG "Source file: $src\n" if ($debug >= 0); 282 286 283 287 if ($dtype eq "rpm") { -
0.5/pb/lib/ProjectBuilder/common.pm
r52 r66 33 33 } 34 34 # 35 # Use project configuration file 35 # Use project configuration file if needed 36 36 # 37 pb_init("$ENV{'PBETC'}"); 37 if (not defined $ENV{'PBROOT'}) { 38 pb_init("$ENV{'PBETC'}"); 38 39 39 if (not defined $proj) {40 # Take the first as the default project41 $proj = (keys %pbroot)[0];40 if (not defined $proj) { 41 # Take the first as the default project 42 $proj = (keys %pbroot)[0]; 42 43 print $LOG "Using $proj as default project as none has been specified\n" if (($debug >= 0) and (defined $proj)); 44 } 45 die "No project defined - use env var PBPROJ or -p proj" if (not (defined $proj)); 46 47 $ENV{'PBROOT'} = $pbroot{$proj}; 48 } else { 49 die "No project defined - use env var PBPROJ or -p proj" if (not (defined $proj)); 43 50 } 44 die "No project defined - use env var PBPROJ or -p proj" if (not (defined $proj));45 46 $ENV{'PBROOT'} = $pbroot{$proj};47 51 48 52 #
Note:
See TracChangeset
for help on using the changeset viewer.