summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
new file mode 100644
index 0000000..ef8dfcd
--- /dev/null
+++ b/src/main.cpp
@@ -0,0 +1,22 @@
+#include "command.h"
+
+int main(int argc, char **argv)
+{
+ std::unique_ptr<katja::command> command;
+
+ try
+ {
+ command = katja::parse_command_line(argc, argv);
+ }
+ catch (katja::command_exception& e)
+ {
+ std::cout << e.what() << std::endl << std::endl;
+
+ katja::help().execute();
+
+ return EXIT_FAILURE;
+ }
+ command->execute();
+
+ return EXIT_SUCCESS;
+}