Subversion Repositories DevTools

Rev

Rev 1546 | Rev 1550 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1546 Rev 1548
Line 4318... Line 4318...
4318
    {
4318
    {
4319
        Error("Incorrect number of params passed to rmDirectory() function.");
4319
        Error("Incorrect number of params passed to rmDirectory() function.");
4320
    }
4320
    }
4321
 
4321
 
4322
    my ($startingPoint) = @_;
4322
    my ($startingPoint) = @_;
-
 
4323
    return 0 unless ( -d $startingPoint );
4323
    Verbose("Recursively removing Directory tree [$startingPoint]");
4324
    Verbose("Recursively removing Directory tree [$startingPoint]");
4324
 
4325
 
4325
    #
4326
    #
4326
    #   Use the rmtree function
4327
    #   Use the rmtree function
4327
    #   It works better than glob when given a filepath with spaces
4328
    #   It works better than glob when given a filepath with spaces
Line 4347... Line 4348...
4347
#------------------------------------------------------------------------------
4348
#------------------------------------------------------------------------------
4348
{
4349
{
4349
    Information("Cleaning any previous target file items...");
4350
    Information("Cleaning any previous target file items...");
4350
 
4351
 
4351
    my ($i);
4352
    my ($i);
4352
    my ($m_dirD);
-
 
4353
 
4353
 
4354
    # lets clean.
4354
    # Clean out PkgBaseDir
-
 
4355
    # This is the directory in whcih the final package image will be assembled
4355
    #
4356
    #
4356
    foreach $i ( sort {$b cmp $a} values %TargetDstDirStructure )
-
 
4357
    {
-
 
4358
        if ( "$i" !~ /^\.$/ &&
-
 
4359
             "$i" !~ /^\.\.$/   )
-
 
4360
        {
-
 
4361
 
-
 
4362
            $m_dirD = "$PkgBaseDir/$TargetBaseDir/$i";
-
 
4363
            if ( -d "$m_dirD" )
-
 
4364
            {
-
 
4365
                rmDirectory("$m_dirD");
-
 
4366
            }
-
 
4367
        }
-
 
4368
    } 
-
 
4369
 
-
 
4370
    $m_dirD = "$PkgPatchTmpDir";
-
 
4371
    if ( -d "$m_dirD" )
-
 
4372
    {
-
 
4373
        rmDirectory("$m_dirD");
-
 
4374
    }
-
 
4375
 
-
 
4376
    $m_dirD = "$PkgBaseDir/$TargetBaseDir";
-
 
4377
    if ( -d "$m_dirD" )
-
 
4378
    {
-
 
4379
        rmDirectory("$m_dirD");
-
 
4380
    }
-
 
4381
 
-
 
4382
    $m_dirD = "$PkgBaseDir";
4357
    rmDirectory("$PkgBaseDir");
4383
    if ( -d "$m_dirD" )
-
 
4384
    {
-
 
4385
        rmDirectory("$m_dirD");
-
 
4386
    }
-
 
4387
 
4358
 
4388
    # lets create.
4359
    # lets create.
4389
    #
4360
    #
4390
    Information ("Creating target directory structure...");
4361
    Information ("Creating target directory structure...");
4391
 
-
 
4392
    make_directory( "$PkgBaseDir/$TargetBaseDir", 0777, "Create target dir");
4362
    make_directory( "$PkgBaseDir/$TargetBaseDir", 0777, "Create target dir");
4393
    foreach $i ( sort {$a cmp $b} values %TargetDstDirStructure )
4363
    foreach $i ( sort {$a cmp $b} values %TargetDstDirStructure )
4394
    {
4364
    {
4395
        make_directory("$PkgBaseDir/$TargetBaseDir/$i", 0777);
4365
        make_directory("$PkgBaseDir/$TargetBaseDir/$i", 0777);
4396
    }
4366
    }