Changeset 21733 for main/trunk
- Timestamp:
- 2010-02-24T13:56:56+13:00 (14 years ago)
- Location:
- main/trunk/greenstone2/bin/script
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/bin/script/incremental-buildcol.pl
r20925 r21733 61 61 62 62 63 my $collect = pop @argv;63 my $collection = pop @argv; 64 64 65 65 my @filtered_argv = (); … … 87 87 } 88 88 89 90 if (!defined $collect_dir) { 91 $collect_dir = &util::filename_cat($ENV{'GSDLHOME'},"collect"); 92 } 93 my $this_collect_dir = &util::filename_cat($collect_dir,$collect); 94 95 if (!-d $this_collect_dir) { 96 print STDERR "Error: $collect_dir does not exist\n"; 97 exit(-1); 98 } 89 # get and check the collection name 90 if ((&colcfg::use_collection($site, $collection, $collect_dir)) eq "") { 91 print STDERR "Unable to use collection \"$collection\" within \"$collect_dir\"\n"; 92 exit -1; 93 } 99 94 100 95 101 96 if (!defined $build_dir) { 102 97 # Yes this is intentional that 'build_dir' points to "index" 103 $build_dir = &util::filename_cat ($this_collect_dir,"index");98 $build_dir = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'},"index"); 104 99 push(@filtered_argv,"-builddir",$build_dir); 105 100 } … … 119 114 } 120 115 121 if ((&colcfg::use_collection($site, $collect, $collect_dir)) eq "") {122 print STDERR "Unable to use collection \"$collect\" within \"$collect_dir\"\n";123 exit -1;124 }125 116 # Read in the collection configuration file. 126 117 my ($collect_cfg_filename, $gs_mode) = &colcfg::get_collect_cfg_name(STDERR); … … 163 154 164 155 165 $buildcol_cmd .= " $quoted_argv \"$collect \"";156 $buildcol_cmd .= " $quoted_argv \"$collection\""; 166 157 167 158 my $buildcol_status = system($buildcol_cmd)/256; -
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.