summaryrefslogtreecommitdiffstats
path: root/depends/pack200/anti200.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'depends/pack200/anti200.cpp')
-rw-r--r--depends/pack200/anti200.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/depends/pack200/anti200.cpp b/depends/pack200/anti200.cpp
new file mode 100644
index 00000000..3dfdb5dc
--- /dev/null
+++ b/depends/pack200/anti200.cpp
@@ -0,0 +1,28 @@
+/*
+ * This is trivial. Do what thou wilt with it. Public domain.
+ */
+
+#include <stdexcept>
+#include <iostream>
+#include "unpack200.h"
+
+int main(int argc, char **argv)
+{
+ if (argc == 3)
+ {
+ try
+ {
+ unpack_200(argv[1], argv[2]);
+ }
+ catch (std::runtime_error &e)
+ {
+ std::cerr << "Bad things happened: " << e.what() << std::endl;
+ return EXIT_FAILURE;
+ }
+ return EXIT_SUCCESS;
+ }
+ else
+ std::cerr << "Simple pack200 unpacker!" << std::endl << "Run like this:" << std::endl
+ << " " << argv[0] << " input.jar.lzma output.jar" << std::endl;
+ return EXIT_FAILURE;
+}