Changeset 82

Show
Ignore:
Timestamp:
02/18/10 22:50:56 (8 years ago)
Author:
depesz
Message:

while reminding myself of the code, I found out that datadir can be easily defaulted to '.'

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/omnipitr/doc/omnipitr-archive.pod

    r61 r82  
    7171 
    7272PostgreSQL "%p" passed file path relative to I<DATADIR>, so it is required to 
    73 know it. 
     73know it. If not provided, it is assumed to be "." ( which is perfectly in line 
     74with PostgreSQL assumptions about archive_command ). 
    7475 
    7576=item * --log 
  • trunk/omnipitr/lib/OmniPITR/Archive.pm

    r71 r82  
    1010    my $self = shift; 
    1111    print "YAY, it worked!\n"; 
     12    print Dumper($self); 
    1213} 
    1314 
     
    1516    my $self = shift; 
    1617 
    17     my %args = (); 
     18    my %args = ( 
     19        'data-dir' => '.', 
     20    ); 
    1821    croak( 'Error while reading command line arguments. Please check documentation in doc/omnipitr-archive.pod' ) 
    1922        unless GetOptions( 
     
    6366    my $self = shift; 
    6467 
    65     $self->log->fatal( "--data-dir was not provided!" ) unless defined $self->{ 'data-dir' }; 
    6668    $self->log->fatal( "Given data-dir (%s) is not valid", $self->{ 'data-dir' } ) unless -d $self->{ 'data-dir' } && -f File::Spec->catfile( $self->{ 'data-dir' }, 'PG_VERSION' ); 
    6769