Refactor save-settings chain on exit (see Controllers package)

Remove concept of 'OldGoldleaf version'. Now all supported version of GoldLeaf listed in Settings tab and one of them has to be always selected.
Add GoldLeaf CLI support
Remove unnecessary tails of 'extras' from CLI Tinfoil/Awoo NET mode.
This commit is contained in:
Dmitry Isaenko 2020-07-07 02:20:57 +03:00
parent dc995e1bae
commit 8da07a37ba
16 changed files with 196 additions and 107 deletions

View file

@ -66,6 +66,10 @@ public class CommandLineInterface {
new TinfoilUsb(tfArguments);
return;
}
if (cli.hasOption("g") || cli.hasOption("goldleaf")){
final String[] glArguments = cli.getOptionValues("goldleaf");
new GoldLeaf(glArguments);
}
}
catch (ParseException pe){
System.out.println(pe.getLocalizedMessage() +
@ -128,7 +132,13 @@ public class CommandLineInterface {
.hasArgs()
.argName("FILE1 ...")
.build();
/* GoldLeaf USB */
final Option glOption = Option.builder("g")
.longOpt("goldleaf")
.desc("Install via GoldLeaf mode. Check '-g help' for information.")
.hasArgs()
.argName("...")
.build();
final OptionGroup group = new OptionGroup();
group.addOption(rcmOption);
@ -137,6 +147,7 @@ public class CommandLineInterface {
group.addOption(versionOption);
group.addOption(helpOption);
group.addOption(tinfoilOption);
group.addOption(glOption);
options.addOptionGroup(group);