Changeset 3771 for trunk/gsdl3/bin/script/gs2_mkcol.pl
- Timestamp:
- 2003-02-26T13:05:08+13:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/bin/script/gs2_mkcol.pl
r3688 r3771 58 58 print STDOUT " different from the creator)\n"; 59 59 print STDOUT " -public true|false If this collection has anonymous access\n"; 60 print STDOUT " -buildtype mg|mgpp Whether to use mg or mgpp to build the collection\n"; 61 print STDOUT " Default is mgpp.\n"; 60 62 print STDOUT " -title text The title for the collection\n"; 61 63 print STDOUT " -about text The about text for the collection\n"; … … 119 121 $line =~ s/\*\*about\*\*/$about/g; 120 122 $line =~ s/\*\*plugins\*\*/$pluginstring/g; 123 $line =~ s/\*\*buildtype\*\*/$buildtype/g; 124 $line =~ s/\*\*indexes\*\*/$indexes/g; 125 $line =~ s/\*\*defaultindex\*\*/$defaultindex/g; 126 $line =~ s/\*\*indexmeta\*\*/$indexmeta/g; 121 127 122 128 print OUTFILE $line; … … 139 145 'maintainer/\w+\@[\w\.]+/', \$maintainer, 140 146 'public/true|false/true', \$public, 147 'buildtype/mg|mgpp/mgpp', \$buildtype, 141 148 'title/.+/', \$title, 142 149 'about/.+/', \$about, … … 219 226 220 227 $public = "true" unless defined $public; 221 228 $buildtype = "mgpp" unless defined $buildtype; 229 230 222 231 if (!defined($title) || $title eq "") { 223 232 $title = $collection; … … 247 256 $cdir = &util::filename_cat ($collectdir, $collection); 248 257 } else { 249 $cdir = &util::filename_cat ($ ENV{'GSDLHOME'}, "collect", $collection);258 $cdir = &util::filename_cat ($sitehome, "collect", $collection); 250 259 } 251 260 … … 259 268 } 260 269 270 # set up the default indexes - this could be a command line option at some stage 271 if ($buildtype eq "mg") { 272 $indexes = "document:text document:Title document:Source"; 273 $defaultindex = "document:text"; 274 $indexmeta = "collectionmeta .document:text \"text\"\ncollectionmeta .document:Title \"titles\"\ncollectionmeta .document:Source \"filenames\"\n"; 275 276 } elsif ($buildtype eq "mgpp") { 277 $indexes = "text,metadata"; 278 $defaultindex = "text,metadata"; 279 $indexmeta = "collectionmeta .text,metadata \"text\"\n"; 280 } else { 281 print STDOUT "Error: buildtype should be mg or mgpp, but its $buildtype\n"; 282 } 261 283 # start creating the collection 262 284 print STDOUT "\nCreating the collection $collection...\n" unless $quiet;
Note:
See TracChangeset
for help on using the changeset viewer.