1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-08-13 17:03:45 -04: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
if (args.runCLI()) {
int status = new ArgumentProcessor().run(args);
System.exit(status);
}
// CLI behaviour for console interactive usage
if (isHeadless() || System.console() != null) {
// print license to console if we have an interactive console
// just import and print license when running with --license option
if (configureLicense(args)) {
System.exit(0);
}
// exit with man page if we can't launch the GUI
if (isHeadless()) {
log.info(String.format("%s / %s (headless)%n%n%s", getApplicationIdentifier(), getJavaRuntimeIdentifier(), args.usage()));
System.exit(1);
}
int status = new ArgumentProcessor().run(args);
System.exit(status);
}
// 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

View File

@ -1,5 +1,6 @@
package net.filebot.cli;
import static java.awt.GraphicsEnvironment.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static net.filebot.Logging.*;
@ -155,7 +156,7 @@ public class ArgumentBean {
public List<String> arguments = new ArrayList<String>();
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() {