Changeset 21733 for main/trunk/greenstone2/bin/script/incremental-import.pl
- Timestamp:
- 2010-02-24T13:56:56+13:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/bin/script/incremental-import.pl
r21732 r21733 43 43 use dbutil; 44 44 use util; 45 45 use colcfg; 46 46 47 47 sub main … … 61 61 62 62 63 my $collect = pop @argv;63 my $collection = pop @argv; 64 64 65 65 my @filtered_argv = (); … … 67 67 my $collect_dir = undef; 68 68 my $archive_dir = undef; 69 my $site = undef; 69 70 70 71 while (my $arg = shift @argv) { … … 81 82 push(@filtered_argv,$arg,$archive_dir); 82 83 } 84 elsif ($arg eq "-site") { 85 $site = shift @argv; 86 push(@filtered_argv,$arg,$site); 87 } 83 88 else { 84 89 push(@filtered_argv,$arg); 85 90 } 86 91 } 87 88 if (!defined $collect_dir) { 89 $collect_dir = &util::filename_cat($ENV{'GSDLHOME'},"collect"); 90 } 91 my $this_collect_dir = &util::filename_cat($collect_dir,$collect); 92 93 if (!-d $this_collect_dir) { 94 print STDERR "Error: $this_collect_dir does not exist\n"; 95 exit(-1); 96 } 97 92 93 # get and check the collection name 94 if ((&colcfg::use_collection($site, $collection, $collect_dir)) eq "") { 95 print STDERR "Unable to use collection \"$collection\" within \"$collect_dir\"\n"; 96 exit -1; 97 } 98 98 99 99 if (!defined $archive_dir) { 100 $archive_dir = &util::filename_cat ($this_collect_dir,"archives");100 $archive_dir = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "archives") 101 101 } 102 102 … … 132 132 } 133 133 134 $import_cmd .= " $quoted_argv \"$collect \"";134 $import_cmd .= " $quoted_argv \"$collection\""; 135 135 136 136
Note:
See TracChangeset
for help on using the changeset viewer.