Changeset 211 in ProjectBuilder


Ignore:
Timestamp:
Oct 14, 2007, 8:46:23 PM (17 years ago)
Author:
Bruno Cornec
Message:

Another fix for newver

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r209 r211  
    707707    pb_cms_checkout($cms,$newurl,"$ENV{'PBROOT'}/../$newver");
    708708    my $oldver=basename($cmsurl);
    709     open(FILE,"+<$ENV{'PBROOT'}/../$newver/pbconf/$ENV{'PBPROJ'}.pb") || die "Unable to open $ENV{'PBROOT'}/../$newver/pbconf/$ENV{'PBPROJ'}.pb";
     709    open(FILE,"$ENV{'PBROOT'}/../$newver/pbconf/$ENV{'PBPROJ'}.pb") || die "Unable to open $ENV{'PBROOT'}/../$newver/pbconf/$ENV{'PBPROJ'}.pb";
     710    open(OUT,"> $ENV{'PBROOT'}/../$newver/pbconf/$ENV{'PBPROJ'}.pb.new") || die "Unable to write to $ENV{'PBROOT'}/../$newver/pbconf/$ENV{'PBPROJ'}.pb.new";
    710711    while(<FILE>) {
    711712        s/projver\s+$ENV{'PBPROJ'}\s*=\s*$oldver/projver $ENV{'PBPROJ'} = $newver/;
     713        print OUT $_;
    712714    }
    713715    close(FILE);
     716    close(OUT);
     717    rename("$ENV{'PBROOT'}/../$newver/pbconf/$ENV{'PBPROJ'}.pb.new","$ENV{'PBROOT'}/../$newver/pbconf/$ENV{'PBPROJ'}.pb");
    714718    pb_cms_checkin($cms,"$ENV{'PBROOT'}/../$newver");
    715719}
Note: See TracChangeset for help on using the changeset viewer.