Skip to content

Commit

Permalink
fix otg with -r command
Browse files Browse the repository at this point in the history
  • Loading branch information
androidlover5842 committed Apr 21, 2018
1 parent b0348d8 commit 9025772
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/main/java/com/github/twrpbuilder/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import java.io.OutputStream;
import java.io.PrintWriter;

import com.github.twrpbuilder.util.Config;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.DefaultParser;
Expand All @@ -20,7 +19,9 @@
public class MainActivity {
private static String applicationName = "TwrpBuilder";
public static String rName;
public static void usePosixParser(final String[] commandLineArguments)
public static boolean otg;

public static void usePosixParser(final String[] commandLineArguments)
{
final CommandLineParser cmdLinePosixParser = new DefaultParser();
final Options posixOptions = constructPosixOptions();
Expand Down Expand Up @@ -76,7 +77,7 @@ public static void usePosixParser(final String[] commandLineArguments)

if(commandLine.hasOption("otg"))
{
MakeTree.otg=true;
otg=true;
}

if(commandLine.hasOption("r"))
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/com/github/twrpbuilder/mkTree/MakeTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@

import com.github.twrpbuilder.util.*;

import static com.github.twrpbuilder.MainActivity.otg;

public class MakeTree {
private long l=0;
private String compressionType;
private boolean lz4,lzma;
private ShellExecutor shell;
private String copyRight=shell.CopyRight();
public static boolean otg;
private GetBuildInfo info;
private Config config;
private String out;
Expand Down Expand Up @@ -186,7 +187,7 @@ private void FstablastMessage() {
System.out.println("tree ready for "+ info.getCodename());
new FWriter(".travis.yml",generateTravis());
System.out.println((char)27 + "[31m" + "Warning :- Check recovery fstab before build");
System.out.println((char)27 + "[0m");
System.out.print("[0m");
}

public void MkFstab() {
Expand Down

0 comments on commit 9025772

Please sign in to comment.