]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/MigrationTools/org/tianocore/migration/MigrationTool.java
new temp schema
[mirror_edk2.git] / Tools / Source / MigrationTools / org / tianocore / migration / MigrationTool.java
index fea4f8b9b0aeae08a144e720075cc36312119aae..004950f96b5fa2437a26dbe833bbbc506596fb71 100644 (file)
@@ -29,6 +29,8 @@ public class MigrationTool {
     \r
     public static final HashMap<ModuleInfo, String> ModuleInfoMap = new HashMap<ModuleInfo, String>();\r
 \r
+    private static String startpath = null;\r
+    \r
     private static final void mainFlow(ModuleInfo mi) throws Exception {\r
 \r
         ModuleReader.aimAt(mi);\r
@@ -36,9 +38,6 @@ public class MigrationTool {
         //MigrationTool.ui.yesOrNo("go on replace?");\r
         SourceFileReplacer.fireAt(mi);    // some adding library actions are taken here,so it must be put before "MsaWriter"\r
 \r
-        //MigrationTool.ui.yesOrNo("go on delete?");\r
-        Common.deleteDir(mi.modulepath + File.separator + "temp");\r
-\r
         //MigrationTool.ui.yesOrNo("go on show?");\r
         // show result\r
         if (MigrationTool.printModuleInfo) {\r
@@ -73,11 +72,11 @@ public class MigrationTool {
         MigrationTool.ui.println(show + hash.size());\r
         MigrationTool.ui.println(hash);\r
     }\r
-/*\r
+\r
     public static final String getTempDir(String modulepath) {\r
-       return "C:" + File.separator + "MigrationTool_Temp" + File.separator + modulepath.replaceAll(ui., arg1);\r
+       return "C:" + File.separator + "MigrationTool_Temp" + modulepath.replace(startpath, "");\r
     }\r
-*/\r
+\r
     private static final String assignOutPutPath(String inputpath) {\r
         if (MigrationTool.defaultoutput) {\r
             return inputpath.replaceAll(Common.STRSEPARATER, "$1");\r
@@ -93,8 +92,14 @@ public class MigrationTool {
     }\r
 \r
     public static final void startMigrateAll(String path) throws Exception {\r
+       startpath = path;\r
         MigrationTool.ui.println("Project Migration");\r
         MigrationTool.ui.println("Copyright (c) 2006, Intel Corporation");\r
+        \r
+        if (new File("C:" + File.separator + "MigrationTool_Temp").exists()) {\r
+            Common.deleteDir("C:" + File.separator + "MigrationTool_Temp");\r
+        }\r
+        \r
         Common.toDoAll(path, MigrationTool.class.getMethod("seekModule", String.class), null, null, Common.DIR);\r
         \r
         Iterator<ModuleInfo> miit = ModuleInfoMap.keySet().iterator();\r
@@ -103,6 +108,8 @@ public class MigrationTool {
         }\r
         \r
         ModuleInfoMap.clear();\r
+        \r
+        Common.deleteDir("C:" + File.separator + "MigrationTool_Temp");\r
     }\r
 \r
     public static void main(String[] args) throws Exception {\r