Changeset 9492
- Timestamp:
- 2005-03-23T14:22:26+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/for-distributions/bin/script/create_distributions.pl
r9254 r9492 157 157 `makegli.sh`; 158 158 159 # JAR up the gli, then clean upthe class files159 # JAR up the gli, then delete the class files 160 160 print STDERR "jarring gli...\n"; 161 161 `makejar.sh`; 162 162 &util::rm_r(&util::filename_cat($tmpdir, "gsdl", "gli", "jar")); 163 163 &util::rm(&util::filename_cat($tmpdir, "gsdl", "gli", "metadata.zip")); 164 `clean.sh`;164 &util::rm_r(&util::filename_cat($tmpdir, "gsdl", "gli", "classes", "org")); 165 165 166 166 # Remove bits used by none of the distributions 167 167 &util::rm(&util::filename_cat($tmpdir, "gsdl", "packages", "cpan", "XML-Parser-2.27.tar.gz")); 168 &util::rm(&util::filename_cat($tmpdir, "gsdl", "packages", "kea", "kea-3.0", "CSTR"));169 168 170 169 # copy ChangeLog into $tmpdir/gsdl … … 181 180 } 182 181 183 &create_collection_distributions() unless $no_cols;184 } 185 186 187 sub create_windows_distribution {188 print STDERR "Creating Windows distribution...\n";189 190 my $windows_dist_dir = &util::filename_cat($output_dir, "gsdl-" . $version_num . "-win32");191 mkdir ($windows_dist_dir, 0777);192 193 # empty "collect" directory (just because all the other distributions have one)194 mkdir (&util::filename_cat($windows_dist_dir, "collect"), 0777);195 196 # docs directory (with none of the manuals), README.TXT, COPYING and Support.htm197 &install_docs ($windows_dist_dir, 1);198 199 # gsdl directory200 &install_gsdl ($windows_dist_dir);201 202 # gli directory (in gsdl)203 &install_gli($windows_dist_dir, "windows");204 205 # src directory206 &install_src ($windows_dist_dir, "windows");207 208 # Windows directory209 &install_windows_specific ($windows_dist_dir, 0);210 211 # we want to include the unbuilt bits of the demo collection too212 my $demodir = &util::filename_cat($windows_dist_dir, "gsdl", "collect", "demo");213 my $tmpdemo = &util::filename_cat($tmpdir, "gsdl", "collect", "demo");214 die "oops, no demo dir\n" unless -d $demodir;215 &util::cp (&util::filename_cat ($tmpdemo, "demo.col"), $demodir);216 &util::cp_r (&util::filename_cat ($tmpdemo, "import"), $demodir);217 &util::cp_r (&util::filename_cat ($tmpdemo, "metadata"), $demodir);218 }182 # &create_collection_distributions() unless $no_cols; 183 } 184 185 186 # sub create_windows_distribution { 187 # print STDERR "Creating Windows distribution...\n"; 188 189 # my $windows_dist_dir = &util::filename_cat($output_dir, "gsdl-" . $version_num . "-win32"); 190 # mkdir ($windows_dist_dir, 0777); 191 192 # # empty "collect" directory (just because all the other distributions have one) 193 # mkdir (&util::filename_cat($windows_dist_dir, "collect"), 0777); 194 195 # # docs directory (with none of the manuals), README.TXT, COPYING and Support.htm 196 # &install_docs ($windows_dist_dir, 1); 197 198 # # gsdl directory 199 # &install_gsdl ($windows_dist_dir); 200 201 # # gli directory (in gsdl) 202 # &install_gli($windows_dist_dir, "windows"); 203 204 # # src directory 205 # &install_src ($windows_dist_dir, "windows"); 206 207 # # Windows directory 208 # &install_windows_specific ($windows_dist_dir, 0); 209 210 # # we want to include the unbuilt bits of the demo collection too 211 # my $demodir = &util::filename_cat($windows_dist_dir, "gsdl", "collect", "demo"); 212 # my $tmpdemo = &util::filename_cat($tmpdir, "gsdl", "collect", "demo"); 213 # die "oops, no demo dir\n" unless -d $demodir; 214 # &util::cp (&util::filename_cat ($tmpdemo, "demo.col"), $demodir); 215 # &util::cp_r (&util::filename_cat ($tmpdemo, "import"), $demodir); 216 # &util::cp_r (&util::filename_cat ($tmpdemo, "metadata"), $demodir); 217 # } 219 218 220 219 … … 250 249 251 250 252 sub create_unix_distribution_old {253 print STDERR "Creating Unix distribution...\n";254 255 my $unix_dist_dir = &util::filename_cat($output_dir, "gsdl-" . $version_num . "-unix");256 mkdir ($unix_dist_dir, 0777);257 258 # empty "collect" directory259 mkdir (&util::filename_cat($unix_dist_dir, "collect"), 0777);260 261 # docs directory (with none of the manuals), README.TXT, COPYING and Support.htm262 &install_docs ($unix_dist_dir, 1);263 264 # Don't need Windows README file265 &util::rm(&util::filename_cat($unix_dist_dir, "READMEru.txt-cp1251"));266 267 # Rename Unix README file268 &util::cp(&util::filename_cat($unix_dist_dir, "READMEru.txt-koi8-r"),269 &util::filename_cat($unix_dist_dir, "READMEru.txt"));270 &util::rm(&util::filename_cat($unix_dist_dir, "READMEru.txt-koi8-r"));271 272 # gsdl directory273 &install_gsdl ($unix_dist_dir);274 275 # gli directory (in gsdl)276 &install_gli($unix_dist_dir, "unix");277 278 # src directory279 &install_src ($unix_dist_dir, "unix");280 281 # Unix directory282 &install_unix_specific ($unix_dist_dir);283 284 # Make sure all configure scripts are executable285 `cd $unix_dist_dir; pwd; find -name "configure" -exec chmod a+x {} \\;`;286 287 # we want to include the unbuilt bits of the demo collection too288 my $demodir = &util::filename_cat($unix_dist_dir, "gsdl", "collect", "demo");289 my $tmpdemo = &util::filename_cat($tmpdir, "gsdl", "collect", "demo");290 die "oops, no demo dir\n" unless -d $demodir;291 &util::cp (&util::filename_cat ($tmpdemo, "demo.col"), $demodir);292 &util::cp_r (&util::filename_cat ($tmpdemo, "import"), $demodir);293 &util::cp_r (&util::filename_cat ($tmpdemo, "metadata"), $demodir);294 }251 # sub create_unix_distribution_old { 252 # print STDERR "Creating Unix distribution...\n"; 253 254 # my $unix_dist_dir = &util::filename_cat($output_dir, "gsdl-" . $version_num . "-unix"); 255 # mkdir ($unix_dist_dir, 0777); 256 257 # # empty "collect" directory 258 # mkdir (&util::filename_cat($unix_dist_dir, "collect"), 0777); 259 260 # # docs directory (with none of the manuals), README.TXT, COPYING and Support.htm 261 # &install_docs ($unix_dist_dir, 1); 262 263 # # Don't need Windows README file 264 # &util::rm(&util::filename_cat($unix_dist_dir, "READMEru.txt-cp1251")); 265 266 # # Rename Unix README file 267 # &util::cp(&util::filename_cat($unix_dist_dir, "READMEru.txt-koi8-r"), 268 # &util::filename_cat($unix_dist_dir, "READMEru.txt")); 269 # &util::rm(&util::filename_cat($unix_dist_dir, "READMEru.txt-koi8-r")); 270 271 # # gsdl directory 272 # &install_gsdl ($unix_dist_dir); 273 274 # # gli directory (in gsdl) 275 # &install_gli($unix_dist_dir, "unix"); 276 277 # # src directory 278 # &install_src ($unix_dist_dir, "unix"); 279 280 # # Unix directory 281 # &install_unix_specific ($unix_dist_dir); 282 283 # # Make sure all configure scripts are executable 284 # `cd $unix_dist_dir; pwd; find -name "configure" -exec chmod a+x {} \\;`; 285 286 # # we want to include the unbuilt bits of the demo collection too 287 # my $demodir = &util::filename_cat($unix_dist_dir, "gsdl", "collect", "demo"); 288 # my $tmpdemo = &util::filename_cat($tmpdir, "gsdl", "collect", "demo"); 289 # die "oops, no demo dir\n" unless -d $demodir; 290 # &util::cp (&util::filename_cat ($tmpdemo, "demo.col"), $demodir); 291 # &util::cp_r (&util::filename_cat ($tmpdemo, "import"), $demodir); 292 # &util::cp_r (&util::filename_cat ($tmpdemo, "metadata"), $demodir); 293 # } 295 294 296 295 … … 333 332 334 333 # Make sure there is a dictionary_en.properties to prevent GLI problems 335 &util::cp(&util::filename_cat($source_dist_dir, "gsdl", "gli", "classes", "dictionary.properties"),336 &util::filename_cat($source_dist_dir, "gsdl", "gli", "classes", "dictionary_en.properties"));334 # &util::cp(&util::filename_cat($source_dist_dir, "gsdl", "gli", "classes", "dictionary.properties"), 335 # &util::filename_cat($source_dist_dir, "gsdl", "gli", "classes", "dictionary_en.properties")); 337 336 338 337 # (We don't include the built demo collection in the source distribution) … … 376 375 &util::cp_r (&util::filename_cat ($tmpdemo, "import"), $demodir); 377 376 &util::cp_r (&util::filename_cat ($tmpdemo, "metadata"), $demodir); 377 378 # Include the documented example collections 379 my $source_collect_dir = &util::filename_cat($for_distributions_dir, "collect"); 380 my $target_collect_dir = &util::filename_cat($cdrom_dist_dir, "collect"); 381 382 &util::cp_r(&util::filename_cat($source_collect_dir, "MARC-e"), $target_collect_dir); 383 &util::cp_r(&util::filename_cat($source_collect_dir, "authen-e"), $target_collect_dir); 384 &util::cp_r(&util::filename_cat($source_collect_dir, "cltbib-e"), $target_collect_dir); 385 &util::cp_r(&util::filename_cat($source_collect_dir, "cltext-e"), $target_collect_dir); 386 &util::cp_r(&util::filename_cat($source_collect_dir, "dls-e"), $target_collect_dir); 387 &util::cp_r(&util::filename_cat($source_collect_dir, "garish"), $target_collect_dir); 388 &util::cp_r(&util::filename_cat($source_collect_dir, "gsarch-e"), $target_collect_dir); 389 &util::cp_r(&util::filename_cat($source_collect_dir, "image-e"), $target_collect_dir); 390 &util::cp_r(&util::filename_cat($source_collect_dir, "isis-e"), $target_collect_dir); 391 &util::cp_r(&util::filename_cat($source_collect_dir, "oai-e"), $target_collect_dir); 392 &util::cp_r(&util::filename_cat($source_collect_dir, "wrdpdf-e"), $target_collect_dir); 378 393 379 394 # Make sure the whole thing is user-writeable … … 596 611 597 612 # Make sure there is a dictionary_en.properties to prevent GLI problems 598 &util::cp(&util::filename_cat($gli_dir, "classes", "dictionary.properties"),599 &util::filename_cat($gli_dir, "classes", "dictionary_en.properties"));613 # &util::cp(&util::filename_cat($gli_dir, "classes", "dictionary.properties"), 614 # &util::filename_cat($gli_dir, "classes", "dictionary_en.properties")); 600 615 601 616 # Remove unwanted stuff - all distributions … … 913 928 my ($tag, $date, $file); 914 929 915 my $datefile = &util::filename_cat ($ ENV{'GSDLHOME'}, "DistDates");930 my $datefile = &util::filename_cat ($for_distributions_dir, "DistDates"); 916 931 if ($changelogdate !~ /\w/) { 917 # get date from $GSDLHOME/DistDates (and update DistDates)932 # get date from for-distributions/DistDates (and update DistDates) 918 933 open (DATES, $datefile) || die "can't open $datefile\n"; 919 934 my $line = ""; … … 938 953 939 954 chdir($ENV{'GSDLHOME'}); 940 my $cmd = " cvs2cl.pl -P -F trunk -r -S -l \"-d'$changelogdate<tomorrow'\"";955 my $cmd = "$for_distributions_dir/bin/script/cvs2cl.pl -P -F trunk -r -S -l \"-d'$changelogdate<tomorrow'\""; 941 956 system ($cmd); 942 957 } … … 945 960 # makes a copy of the initial version of gsdlsite.cfg in 946 961 # /tmp (if it doesn't exist already). 947 sub edit_gsdlsite {948 my ($gsdlhome) = @_;949 950 my $gsdlsite_file = &util::filename_cat ($tmpdir, "gsdl", "cgi-bin", "gsdlsite.cfg");951 my $tmp_gsdlsite_file = &util::filename_cat ($tmpdir, "gsdlsite.cfg");952 953 if (-e $tmp_gsdlsite_file) {954 &util::cp ($tmp_gsdlsite_file, $gsdlsite_file);955 } else {956 &util::cp ($gsdlsite_file, $tmp_gsdlsite_file);957 }958 959 open (GSDLSITE, $gsdlsite_file) || die;960 my $line = ""; my $file = ""; my $found = 0;961 while (defined ($line = <GSDLSITE>)) {962 if ($line =~ s/\*\*GSDLHOME\*\*/$gsdlhome/g) {963 $found = 1;964 }965 $file .= $line;966 }967 close GSDLSITE;968 969 if (!$found) {970 die "ERROR: $gsdlsite_file contains no **GSDLHOME** string\n";971 }972 973 open (GSDLSITE, ">$gsdlsite_file") || die;974 print GSDLSITE $file;975 close GSDLSITE;976 }962 # sub edit_gsdlsite { 963 # my ($gsdlhome) = @_; 964 965 # my $gsdlsite_file = &util::filename_cat ($tmpdir, "gsdl", "cgi-bin", "gsdlsite.cfg"); 966 # my $tmp_gsdlsite_file = &util::filename_cat ($tmpdir, "gsdlsite.cfg"); 967 968 # if (-e $tmp_gsdlsite_file) { 969 # &util::cp ($tmp_gsdlsite_file, $gsdlsite_file); 970 # } else { 971 # &util::cp ($gsdlsite_file, $tmp_gsdlsite_file); 972 # } 973 974 # open (GSDLSITE, $gsdlsite_file) || die; 975 # my $line = ""; my $file = ""; my $found = 0; 976 # while (defined ($line = <GSDLSITE>)) { 977 # if ($line =~ s/\*\*GSDLHOME\*\*/$gsdlhome/g) { 978 # $found = 1; 979 # } 980 # $file .= $line; 981 # } 982 # close GSDLSITE; 983 984 # if (!$found) { 985 # die "ERROR: $gsdlsite_file contains no **GSDLHOME** string\n"; 986 # } 987 988 # open (GSDLSITE, ">$gsdlsite_file") || die; 989 # print GSDLSITE $file; 990 # close GSDLSITE; 991 # } 977 992 978 993 # currently just checks that iconcollection fields are correct and that
Note:
See TracChangeset
for help on using the changeset viewer.