Changeset 69 for devel/pb/bin/pb


Ignore:
Timestamp:
Aug 31, 2007, 3:20:15 PM (12 years ago)
Author:
bruno
Message:

Rework interfaces of pb_init, conf files content and management to ease usage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r68 r69  
    2020use POSIX qw(strftime);
    2121
    22 use vars qw (%defpkgdir %extpkgdir %version %confparam %filteredfiles %pbroot $debug $LOG $projectbuilderver $projectbuilderrev);
     22use vars qw (%defpkgdir %extpkgdir %version %confparam %filteredfiles $debug $LOG $projectbuilderver $projectbuilderrev);
    2323$debug = 0;                 # Debug level
    2424$LOG = *STDOUT;             # Where to log
     
    252252
    253253        # Archive dest dir
    254         chdir "$ENV{'PBDESTDIR'}";
     254        chdir "$ENV{'PBDESTDIR'}" || die "Unable to change dir to $ENV{'PBDESTDIR'}";
    255255        # Possibility to look at PBSRC to guess more the filename
    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);
    258258        # Keep track of what is generated for build2pkg default
    259         open(LAST,"> $ENV{'PBDESTDIR'}/LAST") || die "Unable to create $ENV{'PBDESTDIR'}/LAST";
     259        open(LAST,"> $ENV{'PBDESTDIR'}/pbrc") || die "Unable to create $ENV{'PBDESTDIR'}/pbrc";
    260260        print LAST "$pbver-$pbtag\n";
    261261        close(LAST);
     
    265265    my $vertag = shift @ARGV;
    266266    if (not defined $vertag) {
    267         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{'PBDESTDIR'}/pbrc") || die "Unable to open $ENV{'PBDESTDIR'}/pbrc\nYou may want to precise as parameter version-tag";
    268268        $vertag = <LAST>;
    269269        chomp($vertag);
     
    411411    print "pb (aka project-builder) Version $projectbuilderver-$projectbuilderrev\n";
    412412    print "\n";
    413     print "Syntax: pb [-vhqt][-p project] <action> [<params>...]\n";
     413    print "Syntax: pb [-vhqt][-r pbroot][-p project] <action> [<params>...]\n";
    414414    print "\n";
    415415    print "-h : This help file\n";
     
    417417    print "-t : Test mode (not done yet)\n";
    418418    print "-v : Verbose mode\n";
     419    print "\n";
     420    print "-r pbroot  : Path Name of project under the CMS \n";
     421    print "             (or use the env variable PBROOT)   \n";
    419422    print "\n";
    420423    print "-p project : Name of the project you're working on\n";
Note: See TracChangeset for help on using the changeset viewer.