Changeset 68 in ProjectBuilder


Ignore:
Timestamp:
Aug 31, 2007, 1:45:51 PM (17 years ago)
Author:
Bruno Cornec
Message:

Remove use of PBTOPDIR useless
delivery dir is cleaned of dir in it only now.
One level less generated during delivery (easier)

Location:
devel/pb
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r67 r68  
    254254        chdir "$ENV{'PBDESTDIR'}";
    255255        # Possibility to look at PBSRC to guess more the filename
    256         pbsystem("tar cfphz $pbpkg-$pbver.tar.gz $pbpkg-$pbver","Creating $pbpkg tar files compressed");
     256        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{'PBTOPDIR'}/LAST") || die "Unable to create $ENV{'PBTOPDIR'}/LAST";
     259        open(LAST,"> $ENV{'PBDESTDIR'}/LAST") || die "Unable to create $ENV{'PBDESTDIR'}/LAST";
    260260        print LAST "$pbver-$pbtag\n";
    261261        close(LAST);
     
    265265    my $vertag = shift @ARGV;
    266266    if (not defined $vertag) {
    267         open(LAST,"$ENV{'PBTOPDIR'}/LAST") || die "Unable to open $ENV{'PBTOPDIR'}/LAST\nYou may want to precise as parameter version-tag";
     267        open(LAST,"$ENV{'PBDESTDIR'}/LAST") || die "Unable to open $ENV{'PBDESTDIR'}/LAST\nYou may want to precise as parameter version-tag";
    268268        $vertag = <LAST>;
    269269        chomp($vertag);
  • devel/pb/lib/ProjectBuilder/common.pm

    r67 r68  
    103103# Adapt to your needs
    104104# Set delivery directory
     105# Removes all directory existing below as they are temp dir only
     106# Files stay and have to be cleaned up manually
    105107#
    106108chdir "$ENV{'PBROOT'}/..";
    107109my $path = `pwd`;
    108110chomp($path);
    109 $ENV{'PBTOPDIR'}=$path."/delivery";
    110 $ENV{'PBDESTDIR'}="$ENV{'PBTOPDIR'}/$ENV{'PBVER'}-$ENV{'PBTAG'}";
     111$ENV{'PBDESTDIR'}=$path."/delivery";
    111112if (-d $ENV{'PBDESTDIR'}) {
    112113    opendir(DIR,$ENV{'PBDESTDIR'}) || die "Unable to open directory $ENV{'PBDESTDIR'}: $!";
    113114    foreach my $d (readdir(DIR)) {
    114115        next if ($d =~ /^\./);
     116        next if (-f "$ENV{'PBDESTDIR'}/$d");
    115117        pbrm_rf("$ENV{'PBDESTDIR'}/$d") if (-d "$ENV{'PBDESTDIR'}/$d");
    116118    }
Note: See TracChangeset for help on using the changeset viewer.