CLI: Move data directory for build-native 69/13669/2
authorhyunsik.noh <hyunsik.noh@samsung.com>
Thu, 12 Dec 2013 02:09:15 +0000 (11:09 +0900)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Thu, 12 Dec 2013 05:00:29 +0000 (21:00 -0800)
Change-Id: I6e7f4f910cc1d04354a543343e5c3dfd6c6a1df9
Signed-off-by: hyunsik.noh <hyunsik.noh@samsung.com>
org.tizen.ncli.ide/src/org/tizen/ncli/ide/subcommands/BuildNativeCLICommand.java

index bf19efc..29b81d1 100644 (file)
@@ -168,7 +168,12 @@ public class BuildNativeCLICommand extends AbstractSubCommand<BuildNative> {
             if (!file.exists()) {
                 file.mkdir();
             }
-            dataPath = importPath + File.separator + "headless";
+            String workParent = workingDir.getParent();
+            if(workParent != null) {
+                dataPath = workParent + File.separator + "headless";
+            } else {
+                dataPath = idePath + File.separator + "headless";
+            }
             
             if(!getBuildTarget()) {
                 log.debug(TizenCLIMessages.BN_CANNOT_CREATE_BUILD_TARGET);
@@ -260,6 +265,7 @@ public class BuildNativeCLICommand extends AbstractSubCommand<BuildNative> {
             if(validateOptions()) {
                 if(makeCommand()) {
                     String command = String.format(HEADLESS_CMD, idePath, importPath, buildPath, dataPath, targetId);
+                    log.debug(command);
                     progressLog.info(HostUtil.returnExecute(command));
                     removeDataDir();
                     if(isSuccessful()) {