Changeset 26441


Ignore:
Timestamp:
2012-11-06T01:44:26+13:00 (11 years ago)
Author:
davidb
Message:

Additional minus-option syntax added to allow the user to specify a command that is sent to import.pl (e.g. -import:OIDType ...) or buildcol.pl (e.g. -buildcol:mode onlyinfodb).

Location:
main/trunk/greenstone2/bin/script
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/full-rebuild.pl

    r25579 r26441  
    132132        push(@import_argv,$arg,$site);
    133133        push(@buildcol_argv,$arg,$site);
    134         push(@activate_argv,$arg,$site);
     134        push(@activate_argv,$arg,$site);
    135135    }
    136136    elsif ($arg eq "-collectdir") {
     
    163163        push(@activate_argv,$arg,$verbosity);
    164164    }
     165    elsif ($arg =~ /-import:(.*)$/) {       
     166        my $import_arg = "-".$1;
     167        my $import_val = shift @argv;
     168        push(@import_argv,$import_arg,$import_val);
     169    }
     170    elsif ($arg =~ /-buildcol:(.*)$/) {     
     171        my $buildcol_arg = "-".$1;
     172        my $buildcol_val = shift @argv;
     173        push(@buildcol_argv,$buildcol_arg,$buildcol_val);
     174    }
     175    elsif ($arg =~ /-activate:(.*)$/) {     
     176        my $activate_arg = "-".$1;
     177        my $activate_val = shift @argv;
     178        push(@activate_argv,$activate_arg,$activate_val);
     179    }
    165180    else {
    166181        push(@import_argv,$arg);
  • main/trunk/greenstone2/bin/script/incremental-rebuild.pl

    r24747 r26441  
    8989        push(@buildcol_argv,$arg,$index_dir);
    9090    }
     91    elsif ($arg =~ /-import:(.*)$/) {       
     92        my $import_arg = "-".$1;
     93        my $import_val = shift @argv;
     94        push(@import_argv,$import_arg,$import_val);
     95    }
     96    elsif ($arg =~ /-buildcol:(.*)$/) {     
     97        my $buildcol_arg = "-".$1;
     98        my $buildcol_val = shift @argv;
     99        push(@buildcol_argv,$buildcol_arg,$buildcol_val);
     100    }
    91101    else {
    92102        push(@import_argv,$arg);
Note: See TracChangeset for help on using the changeset viewer.