Changeset 67 for devel/pb/bin/pb


Ignore:
Timestamp:
Aug 31, 2007, 1:23:27 PM (12 years ago)
Author:
bruno
Message:

Add the -r option to support multiple version in parallel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r63 r67  
    4141my $pbdate = strftime("%Y-%m-%d", @date);
    4242
    43 getopts('hl:p:qtv',\%opts);
     43getopts('hl:p:qr:tv',\%opts);
    4444
    4545version_init();
     
    7070die syntax() if (not defined $action);
    7171
     72# Handle root of the project if defined
     73if (defined $opts{'r'}) {
     74    $ENV{'PBROOT'} = $opts{'r'};
     75}
    7276# Handles project name if any
    7377if (defined $opts{'p'}) {
     
    253257        print $LOG "Under $ENV{'PBDESTDIR'}/$pbpkg-$pbver.tar.gz\n" if ($debug >= 0);
    254258        # Keep track of what is generated for build2pkg default
    255         open(LAST,"> $ENV{'PBDESTDIR'}/LAST") || die "Unable to create $ENV{'PBDESTDIR'}/LAST";
     259        open(LAST,"> $ENV{'PBTOPDIR'}/LAST") || die "Unable to create $ENV{'PBTOPDIR'}/LAST";
    256260        print LAST "$pbver-$pbtag\n";
    257261        close(LAST);
     
    261265    my $vertag = shift @ARGV;
    262266    if (not defined $vertag) {
    263         open(LAST,"$ENV{'PBDESTDIR'}/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";
    264268        $vertag = <LAST>;
    265269        chomp($vertag);
     
    279283    foreach my $pbpkg (@pkgs) {
    280284        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);
    282286
    283287        if ($dtype eq "rpm") {
Note: See TracChangeset for help on using the changeset viewer.