Changeset 2310


Ignore:
Timestamp:
Sep 6, 2017, 9:08:44 PM (2 weeks ago)
Author:
bruno
Message:

Create pb_env_create_dirs to allow later directory creation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/lib/ProjectBuilder/Env.pm

    r2309 r2310  
    281281    closedir(DIR);
    282282}
    283 if (! -d "$ENV{'PBDESTDIR'}") {
    284     pb_mkdir_p($ENV{'PBDESTDIR'});
    285 }
    286283
    287284#
     
    289286#
    290287$ENV{'PBBUILDDIR'}="$pbconfpath/pbbuild";
    291 if (! -d "$ENV{'PBBUILDDIR'}") {
    292     pb_mkdir_p($ENV{'PBBUILDDIR'});
    293 }
    294288
    295289pb_log(1,"PBBUILDDIR: $ENV{'PBBUILDDIR'}\n");
     
    13061300        }
    13071301    }
     1302    pb_env_create_dirs();
    13081303    umask 0022;
    13091304    return(\%filteredfiles, \%supfiles, \%defpkgdir, \%extpkgdir);
    13101305} elsif ($action =~ /^(newv|setupv)/) {
     1306    pb_env_create_dirs();
    13111307    # No PBDESTDIR yet so doing nothing
    13121308    return;
    13131309} else {
     1310    pb_env_create_dirs();
     1311
    13141312    # Setup the variables from what has been stored at the end of cms2build
    13151313    my ($var) = pb_conf_read("$ENV{'PBDESTDIR'}/pbrc.yml","pbroot");
     
    13281326}
    13291327}
     1328sub pb_env_create_dirs {
     1329if (! -d "$ENV{'PBDESTDIR'}") {
     1330    pb_mkdir_p($ENV{'PBDESTDIR'});
     1331}
     1332if (! -d "$ENV{'PBBUILDDIR'}") {
     1333    pb_mkdir_p($ENV{'PBBUILDDIR'});
     1334}
     1335}
    13301336
    13311337=head1 WEB SITES
Note: See TracChangeset for help on using the changeset viewer.