Changeset 70


Ignore:
Timestamp:
08/31/07 15:27:27 (6 years ago)
Author:
bruno
Message:

pbrc is now global and no hardcoded conf file used anymore

Location:
devel/pb
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r69 r70  
    2020use POSIX qw(strftime); 
    2121 
    22 use vars qw (%defpkgdir %extpkgdir %version %confparam %filteredfiles $debug $LOG $projectbuilderver $projectbuilderrev); 
     22use vars qw (%defpkgdir %extpkgdir %version %confparam %filteredfiles %pbrc $debug $LOG $projectbuilderver $projectbuilderrev); 
    2323$debug = 0;                 # Debug level 
    2424$LOG = *STDOUT;             # Where to log 
     
    256256        pbsystem("tar cfpz $pbpkg-$pbver.tar.gz $pbpkg-$pbver","Creating $pbpkg tar files compressed"); 
    257257        print $LOG "Under $ENV{'PBDESTDIR'}/$pbpkg-$pbver.tar.gz\n" if ($debug >= 0); 
    258         # Keep track of what is generated for build2pkg default 
    259         open(LAST,"> $ENV{'PBDESTDIR'}/pbrc") || die "Unable to create $ENV{'PBDESTDIR'}/pbrc"; 
     258        # Keep track of what is generated for default 
     259        open(LAST,"> $pbrc{$ENV{'PBPROJ'}}") || die "Unable to create $pbrc{$ENV{'PBPROJ'}}"; 
    260260        print LAST "$pbver-$pbtag\n"; 
    261261        close(LAST); 
     
    265265    my $vertag = shift @ARGV; 
    266266    if (not defined $vertag) { 
    267         open(LAST,"$ENV{'PBDESTDIR'}/pbrc") || die "Unable to open $ENV{'PBDESTDIR'}/pbrc\nYou may want to precise as parameter version-tag"; 
     267        open(LAST,"$pbrc{$ENV{'PBPROJ'}}") || die "Unable to open $pbrc{$ENV{'PBPROJ'}}\nYou may want to precise as parameter version-tag"; 
    268268        $vertag = <LAST>; 
    269269        chomp($vertag); 
  • devel/pb/lib/ProjectBuilder/common.pm

    r69 r70  
    1313use File::Temp qw /tempdir/; 
    1414use Data::Dumper; 
     15use vars qw (%pbrc); 
    1516 
    1617$ENV{'PBETC'} = "$ENV{'HOME'}/.pbrc"; 
     
    3738# and use its content 
    3839# 
    39 $pbrc = pb_init("$ENV{'PBETC'}","pbrc"); 
     40my $pbrc = pb_init("$ENV{'PBETC'}","pbrc"); 
    4041 
    41 my %pbrc = %$pbrc; 
     42%pbrc = %$pbrc; 
    4243if (not defined $proj) { 
    4344    # Take the first as the default project 
Note: See TracChangeset for help on using the changeset viewer.