| 1 | package jagi.fs; |
| 2 | |
| 3 | import java.util.function.*; |
| 4 | import java.io.*; |
| 5 | import jagi.*; |
| 6 | |
| 7 | public class Bootstrap { |
| 8 | private static void usage(PrintStream out) { |
| 9 | out.println("usage: jagi-fs [-h]"); |
| 10 | } |
| 11 | |
| 12 | public static Function wmain(String[] argv) { |
| 13 | PosixArgs opt = PosixArgs.getopt(argv, "h"); |
| 14 | if(opt == null) { |
| 15 | usage(System.err); |
| 16 | System.exit(1); |
| 17 | return(null); |
| 18 | } |
| 19 | for(char c : opt.parsed()) { |
| 20 | switch(c) { |
| 21 | case 'h': |
| 22 | usage(System.out); |
| 23 | System.exit(0); |
| 24 | break; |
| 25 | } |
| 26 | } |
| 27 | return(new Handler()); |
| 28 | } |
| 29 | } |