Repository: flex-falcon Updated Branches: refs/heads/develop 06a2533bb -> 5a2f2db86
Manage output alias "-o" (cherry picked from commit cf9a798) Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/ba007a1f Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/ba007a1f Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/ba007a1f Branch: refs/heads/develop Commit: ba007a1f34de52a926fb6eb35304028c0f5825c6 Parents: 06a2533 Author: Frédéric THOMAS <webdoubl...@gmail.com> Authored: Wed Jun 3 16:05:11 2015 +0100 Committer: Frédéric THOMAS <webdoubl...@gmail.com> Committed: Thu Jun 4 11:42:40 2015 +0100 ---------------------------------------------------------------------- flex-compiler-oem/src/flex2/tools/Tool.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/ba007a1f/flex-compiler-oem/src/flex2/tools/Tool.java ---------------------------------------------------------------------- diff --git a/flex-compiler-oem/src/flex2/tools/Tool.java b/flex-compiler-oem/src/flex2/tools/Tool.java index b77dd8f..2232ae9 100644 --- a/flex-compiler-oem/src/flex2/tools/Tool.java +++ b/flex-compiler-oem/src/flex2/tools/Tool.java @@ -89,6 +89,15 @@ public class Tool { bag.oldOutputPath = ArgumentUtil.getValue(bag.args, "-output"); if (bag.oldOutputPath == null) { + bag.oldOutputPath = ArgumentUtil.getValue(bag.args, "-o"); + if (bag.oldOutputPath != null) { + bag.outputAlias = "-o"; + } + } else { + bag.outputAlias = "-output"; + } + + if (bag.oldOutputPath == null) { bag.isCommandLineOutput = false; ConfigurationBuffer flexConfig = null; @@ -109,7 +118,7 @@ public class Tool { bag.newOutputPath = bag.oldOutputPath.substring(0, lastIndexOf) + File.separator + "js" + File.separator + "out"; if (bag.isCommandLineOutput) { - ArgumentUtil.setValue(bag.args, "-output", bag.newOutputPath); + ArgumentUtil.setValue(bag.args, bag.outputAlias, bag.newOutputPath); } else { bag.args = ArgumentUtil.addValueAt(bag.args, "-output", bag.newOutputPath, bag.args.length - 1); } @@ -124,7 +133,7 @@ public class Tool { if (bag.oldOutputPath != null) { if (bag.isCommandLineOutput) { - ArgumentUtil.setValue(bag.args, "-output", bag.oldOutputPath); + ArgumentUtil.setValue(bag.args, bag.outputAlias, bag.oldOutputPath); } else { bag.args = ArgumentUtil.removeElement(bag.args, "-output"); } @@ -305,6 +314,7 @@ public class Tool { protected static class ArgumentBag { public String[] args; + public String outputAlias; public String oldOutputPath; public String newOutputPath; public boolean isCommandLineOutput;