diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-09-29 21:11:30 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-09-29 21:11:30 +0200 |
commit | 604162acdf5283a9759c1b3ce9e90887a6599ce7 (patch) | |
tree | 06dc5f9ce330afb03922f822b9203169e17576e6 /depends/pack200/anti200.cpp | |
parent | d267d86f6e24c4f947c30c1a3642d57b82f8addd (diff) | |
download | MultiMC-604162acdf5283a9759c1b3ce9e90887a6599ce7.tar MultiMC-604162acdf5283a9759c1b3ce9e90887a6599ce7.tar.gz MultiMC-604162acdf5283a9759c1b3ce9e90887a6599ce7.tar.lz MultiMC-604162acdf5283a9759c1b3ce9e90887a6599ce7.tar.xz MultiMC-604162acdf5283a9759c1b3ce9e90887a6599ce7.zip |
Turn pack200 into an actual library
Diffstat (limited to 'depends/pack200/anti200.cpp')
-rw-r--r-- | depends/pack200/anti200.cpp | 28 |
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; +} |