diff --git a/brut.apktool/apktool-cli/src/main/java/brut/apktool/Main.java b/brut.apktool/apktool-cli/src/main/java/brut/apktool/Main.java index e5efbdf8..054d4200 100644 --- a/brut.apktool/apktool-cli/src/main/java/brut/apktool/Main.java +++ b/brut.apktool/apktool-cli/src/main/java/brut/apktool/Main.java @@ -182,10 +182,9 @@ public class Main { } private static void cmdBuild(CommandLine cli) throws BrutException { - int paraCount = cli.getArgList().size(); - String apkName = (String) cli.getArgList().get(paraCount - 1); + String[] args = cli.getArgs(); + String appDirName = args.length < 2 ? "." : args[1]; String mAaptPath = ""; - String appDirName = "."; File outFile = null; Androlib instance = new Androlib(); @@ -223,10 +222,6 @@ public class Main { outFile = null; } - if (apkName != null) { - appDirName = apkName; - } - // try and build apk instance.build(new File(appDirName), outFile, flags,mAaptPath); }