Last change
on this file since 13599 was 13328, checked in by mdewsnip, 18 years ago |
Moved most of the zip code into the "remote" package, to better indicate where it is used and to simplify the creation of the GLIServer.jar file.
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
698 bytes
|
Rev | Line | |
---|
[10726] | 1 | package org.greenstone.gatherer.remote;
|
---|
| 2 |
|
---|
| 3 | import java.io.File;
|
---|
| 4 | import java.util.ArrayList;
|
---|
| 5 |
|
---|
| 6 |
|
---|
| 7 | /**
|
---|
| 8 | */
|
---|
| 9 | public class ZipFiles
|
---|
| 10 | {
|
---|
| 11 | static public void main(String[] args)
|
---|
| 12 | {
|
---|
| 13 | if (args.length < 3) {
|
---|
| 14 | System.err.println("Usage: ZipFiles <zip-file> <base-directory-path> (<files> ...)");
|
---|
| 15 | return;
|
---|
| 16 | }
|
---|
| 17 |
|
---|
| 18 | String zip_file_path = args[0];
|
---|
| 19 | String base_directory_path = args[1];
|
---|
| 20 | ArrayList relative_file_paths_list = new ArrayList();
|
---|
| 21 | for (int i = 2; i < args.length; i++) {
|
---|
| 22 | relative_file_paths_list.add(args[i]);
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 | String[] relative_file_paths = (String[]) relative_file_paths_list.toArray(new String[0]);
|
---|
| 26 | ZipTools.zipFiles(zip_file_path, base_directory_path, relative_file_paths);
|
---|
| 27 | }
|
---|
| 28 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.