if (!projectFileDir.exists()) {
log.error("Cannot find directory " + projectDir);
System.exit(1);
}
TemplyUI ui = TemplyUIFactory.getInstance().getUI(type);
Project project = new Project(projectFileDir);
Template template = (Template) ui.combo("Template", project.getTemplates());
if (template == null) {
return;
}
Destination destination = (Destination) ui.combo("Destination", template.getDestinations());
if (destination == null) {
return;
}
String script = (String) ui.combo("Script", project.getScripts());
if (script == null) {
return;
}
project.run(script, ui, template, destination);
System.exit(0);