Changeset 14307
- Timestamp:
- 2007-08-06T10:38:11+12:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/remote/ZipCollectionShell.java
r13328 r14307 11 11 static public void main(String[] args) 12 12 { 13 if ( args.length != 3) {14 System.err.println("Usage: ZipCollectionShell <zip-file> <collect-directory-path> <collection-name> ");13 if ((args.length < 3) || (args.length > 4)) { 14 System.err.println("Usage: ZipCollectionShell <zip-file> <collect-directory-path> <collection-name> [gsdl3]"); 15 15 return; 16 16 } … … 19 19 String collect_directory_path = args[1]; 20 20 String collection_name = args[2]; 21 21 String run_gsdl3 =""; 22 if (args.length == 4){ 23 run_gsdl3 = args[3]; 24 } 22 25 if (!collect_directory_path.endsWith(File.separator)) { 23 26 collect_directory_path += File.separator; … … 33 36 ZipTools.addFileToZip(zos, collect_directory_path, archives_relative_path, collection_archives_zip_filter); 34 37 35 // Add etc/collect.cfg file 36 String collect_cfg_relative_path = collection_name + File.separator + "etc" + File.separator + "collect.cfg"; 37 ZipTools.addFileToZip(zos, collect_directory_path, collect_cfg_relative_path, null_zip_filter); 38 38 // Add /etc/collect.cfg file for 2 GS2 39 if (run_gsdl3.length()==0){ 40 String collect_cfg_relative_path = collection_name + File.separator + "etc" + File.separator + "collect.cfg"; 41 ZipTools.addFileToZip(zos, collect_directory_path, collect_cfg_relative_path, null_zip_filter); 42 } 43 // Add /etc/collectConfig.xml file for a GS3 44 if (run_gsdl3.equals("gsdl3")){ 45 String collectionConfig_xml_relative_path = collection_name + File.separator + "etc" + File.separator + "collectionConfig.xml"; 46 ZipTools.addFileToZip(zos, collect_directory_path, collectionConfig_xml_relative_path, null_zip_filter); 47 } 39 48 // Add images directory 40 49 String images_relative_path = collection_name + File.separator + "images";
Note:
See TracChangeset
for help on using the changeset viewer.