Changeset 72 in ProjectBuilder for devel/pb/bin
- Timestamp:
- Aug 31, 2007, 3:40:54 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/pb
r70 r72 19 19 use Time::localtime qw(localtime); 20 20 use POSIX qw(strftime); 21 use ProjectBuilder::pb qw (pb_init); 21 22 22 23 use vars qw (%defpkgdir %extpkgdir %version %confparam %filteredfiles %pbrc $debug $LOG $projectbuilderver $projectbuilderrev); … … 258 259 # Keep track of what is generated for default 259 260 open(LAST,"> $pbrc{$ENV{'PBPROJ'}}") || die "Unable to create $pbrc{$ENV{'PBPROJ'}}"; 260 print LAST " $pbver-$pbtag\n";261 print LAST "pbroot $pbver-$pbtag = $ENV{'PBROOT'}\n"; 261 262 close(LAST); 262 263 } … … 265 266 my $vertag = shift @ARGV; 266 267 if (not defined $vertag) { 267 open(LAST,"$pbrc{$ENV{'PBPROJ'}}") || die "Unable to open $pbrc{$ENV{'PBPROJ'}}\nYou may want to precise as parameter version-tag"; 268 $vertag = <LAST>; 269 chomp($vertag); 270 close(LAST); 268 if (-f $pbrc{$ENV{'PBPROJ'}}) { 269 my $pbroot = pb_init($pbrc{$ENV{'PBPROJ'}},"pbroot"); 270 # There is only one line normaly 271 $vertag = (keys %$pbroot)[0] 272 $ENV{'PBROOT'} = (values %$pbroot)[0] 273 } else { 274 die "Unable to open $pbrc{$ENV{'PBPROJ'}}\nYou may want to precise as parameter version-tag"; 275 } 271 276 } 272 277 ($pbver,$pbtag) = split(/-/,$vertag);
Note:
See TracChangeset
for help on using the changeset viewer.