Specify data directory via CLI argument
This commit is contained in:
parent
7282a5c69f
commit
4e7c880b93
|
@ -93,4 +93,18 @@ public class Indexer {
|
|||
}
|
||||
commitChanges();
|
||||
}
|
||||
|
||||
private static void usage() {
|
||||
System.out.println("Usage: Indexer <directory>");
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws ParseException, IOException {
|
||||
if (args.length != 1) {
|
||||
usage();
|
||||
}
|
||||
String dataDirectory = args[0];
|
||||
Indexer indexer = new Indexer(dataDirectory);
|
||||
indexer.populateIndex();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue