mirror of
https://codeberg.org/PGPainless/bc-sop.git
synced 2025-12-08 07:21:07 +01:00
Working native image
This commit is contained in:
parent
cc4870219a
commit
0123b0e5fe
12 changed files with 254 additions and 41 deletions
|
|
@ -1,14 +1,27 @@
|
|||
package org.pgpainless;
|
||||
|
||||
import org.pgpainless.bouncycastle.sop.BouncyCastleSOP;
|
||||
import picocli.CommandLine;
|
||||
import sop.cli.picocli.SOPExceptionExitCodeMapper;
|
||||
import sop.cli.picocli.SOPExecutionExceptionHandler;
|
||||
import sop.cli.picocli.SopCLI;
|
||||
|
||||
public class BcSopCLI {
|
||||
public class BcSopCLI extends SopCLI {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SopCLI.EXECUTABLE_NAME = "bc-sop";
|
||||
SopCLI.setSopInstance(new BouncyCastleSOP());
|
||||
int exitCode = SopCLI.execute(args);
|
||||
System.exit(exitCode);
|
||||
System.exit(run(args));
|
||||
}
|
||||
|
||||
public static int run(String[] args)
|
||||
{
|
||||
CommandLine cmd = new CommandLine(SopCLI.class);
|
||||
cmd.getSubcommands().get("generate-completion").getCommandSpec().usageMessage().hidden(true);
|
||||
cmd.setCommandName("bcsop");
|
||||
cmd.setExecutionExceptionHandler(new SOPExecutionExceptionHandler());
|
||||
cmd.setExitCodeExceptionMapper(new SOPExceptionExitCodeMapper());
|
||||
cmd.setCaseInsensitiveEnumValuesAllowed(true);
|
||||
return cmd.execute(args);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue