Changeset 590 for devel/pb/bin/pb


Ignore:
Timestamp:
Oct 14, 2008, 11:28:50 AM (11 years ago)
Author:
Bruno Cornec
Message:
  • Impove CmS messages when dealing with /.. paths
  • Improve newver and pbcl management in order to only touch created files, not original ones.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r586 r590  
    16151615    # Checking pbcl files
    16161616    foreach my $f (<$ENV{'PBROOTDIR'}/*/pbcl>) {
     1617        # Compute new pbcl file
     1618        my $f2 = $f;
     1619        $f2 =~ s|$ENV{'PBROOTDIR'}|$ENV{'PBROOTDIR'}/../$newver/|;
    16171620        open(PBCL,$f) || die "Unable to open $f";
    16181621        my $foundnew = 0;
     
    16211624        }
    16221625        close(PBCL);
    1623         open(OUT,"> $f.new") || die "Unable to write to $f.new: $!";
     1626        open(OUT,"> $f2") || die "Unable to write to $f2: $!";
    16241627        open(PBCL,$f) || die "Unable to open $f";
    16251628        while (<PBCL>) {
     
    16291632                print OUT "- TBD\n";
    16301633                print OUT "\n";
    1631                 pb_log(0,"WARNING: version $newver not found in $f so added...") if ($foundnew == 0);
     1634                pb_log(0,"WARNING: version $newver not found in $f so added to $f2...\n") if ($foundnew == 0);
    16321635            }
    16331636        }
    16341637        close(OUT);
    16351638        close(PBCL);
    1636         rename("$f.new","$f");
    16371639    }
    16381640
Note: See TracChangeset for help on using the changeset viewer.