Changeset 739 in ProjectBuilder


Ignore:
Timestamp:
Mar 18, 2009, 1:45:23 AM (15 years ago)
Author:
Bruno Cornec
Message:

Adds clean feature

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r735 r739  
    232232
    233233Deliver the Web site content to the target server using ssh.
     234
     235=item B<clean>
     236
     237Purge the build and delivery directories related to the current project
    234238
    235239=back
     
    444448    # Nothing to do - already done in pb_env_init
    445449} elsif ($action =~ /^clean$/) {
    446     # TBC
     450    pb_clean();
    447451} elsif ($action =~ /^announce$/) {
    448452    # For announce only. Require avoids the systematic load of these modules
     
    17321736
    17331737
     1738sub pb_clean {
     1739
     1740    my $sleep=10;
     1741    die "Unable to get env var PBDESTDIR" if (not defined $ENV{'PBDESTDIR'});
     1742    die "Unable to get env var PBBUILDDIR" if (not defined $ENV{'PBBUILDDIR'});
     1743    pb_log(0,"We will now wait $sleep s before removing both directories\n$ENV{'PBDESTDIR'} and $ENV{'PBBUILDDIR'}.\nPlease break me if this is wrong\n");
     1744    sleep $sleep;
     1745    pb_rm_rf($ENV{'PBDESTDIR'});
     1746    pb_rm_rf($ENV{'PBBUILDDIR'});
     1747}
     1748
    17341749sub pb_newver {
    17351750
Note: See TracChangeset for help on using the changeset viewer.