public static void main(final String[] args) {
        int p = 0;
        String[] paths = new String[2];
        boolean ignorePrivateModules = false;
        for (int i = 0; i < args.length; i++) {
            if (args[i].equals("-i") || args[i].equals("--ignore-private-modules")) {
                ignorePrivateModules = true;
                continue;
            }
            paths[p++] = args[i];
        }
        try {
            final SortedMap<String, Module> install1 = scanModules(paths[0], ignorePrivateModules);
            final SortedMap<String, Module> install2 = scanModules(paths[1], ignorePrivateModules);

            final StringBuilder report = diff(install1, install2, new Reporter<Module>() {
                @Override
                public StringBuilder compare(Module o1, Module o2) {
                    if (o1 != null) {
                        if (o2 != null) {
                            final StringBuilder sb = diff(o1.getResources(), o2.getResources());
                            if (sb.length() > 0)
                                sb.insert(0, "  ~ module " + o1.getName() + " changed\n");
                            return sb;
                        }
                        else {
                            return new StringBuilder("  - module " + o1.getName() + " deleted\n");
                        }
                    }
                    else {
                        assert o2 != null;
                        return new StringBuilder("  + module " + o2.getName() + " added\n");
                    }
                }
            });
            System.out.println(report);
        } catch (IOException e) {
            e.printStackTrace();
            System.exit(1);
        }
    }