1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-23 08:18:52 -05:00

Experiment with PGP signed messages

This commit is contained in:
Reinhard Pointner 2018-06-10 22:45:24 +07:00
parent f0a59d51f0
commit f468be3a62
2 changed files with 11 additions and 13 deletions

View File

@ -113,22 +113,19 @@ public class Main {
// CLI mode => run command-line interface and then exit // CLI mode => run command-line interface and then exit
if (args.runCLI()) { if (args.runCLI()) {
int status = new ArgumentProcessor().run(args); // just import and print license when running with --license option
System.exit(status);
}
// CLI behaviour for console interactive usage
if (isHeadless() || System.console() != null) {
// print license to console if we have an interactive console
if (configureLicense(args)) { if (configureLicense(args)) {
System.exit(0); System.exit(0);
} }
// exit with man page if we can't launch the GUI int status = new ArgumentProcessor().run(args);
if (isHeadless()) { System.exit(status);
log.info(String.format("%s / %s (headless)%n%n%s", getApplicationIdentifier(), getJavaRuntimeIdentifier(), args.usage())); }
System.exit(1);
} // just print help page if we can't run any command and also can't start the GUI
if (isHeadless()) {
log.info(String.format("%s / %s (headless)%n%n%s", getApplicationIdentifier(), getJavaRuntimeIdentifier(), args.usage()));
System.exit(1);
} }
// GUI mode => start user interface // GUI mode => start user interface

View File

@ -1,5 +1,6 @@
package net.filebot.cli; package net.filebot.cli;
import static java.awt.GraphicsEnvironment.*;
import static java.util.Arrays.*; import static java.util.Arrays.*;
import static java.util.Collections.*; import static java.util.Collections.*;
import static net.filebot.Logging.*; import static net.filebot.Logging.*;
@ -155,7 +156,7 @@ public class ArgumentBean {
public List<String> arguments = new ArrayList<String>(); public List<String> arguments = new ArrayList<String>();
public boolean runCLI() { public boolean runCLI() {
return rename || getSubtitles || check || list || mediaInfo || revert || extract || script != null; return rename || getSubtitles || check || list || mediaInfo || revert || extract || script != null || (license != null && isHeadless());
} }
public boolean isInteractive() { public boolean isInteractive() {