flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ftho...@apache.org
Subject [1/2] git commit: [flex-falcon] [refs/heads/develop] - Manage output alias "-o" (cherry picked from commit cf9a798)
Date Thu, 04 Jun 2015 10:48:53 GMT
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 <webdoublefx@gmail.com>
Authored: Wed Jun 3 16:05:11 2015 +0100
Committer: Frédéric THOMAS <webdoublefx@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;


Mime
View raw message