]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/build.xml
Provide a way to update config files[target.txt, tools_def.txt, FrameworkDatabase...
[mirror_edk2.git] / Tools / build.xml
index caef839b504b61d63667032a2a18e4f2b1d5d10a..9d4e6dbc3903a47080f2cff404f21357dde1c831 100644 (file)
@@ -119,6 +119,55 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     </if>\r
   </target>\r
 \r
+  <target name="reconfig">\r
+    <!-- backup all config files -->\r
+    <if>\r
+      <available file="Conf/target.txt"/>\r
+      <then>\r
+        <echo message="Backup Conf/target.txt to Conf/target.txt.bak" />\r
+        <copy file="Conf/target.txt" tofile="Conf/target.txt.bak" overwrite="true" />\r
+      </then>\r
+    </if>\r
+    <if>\r
+      <available file="Conf/tools_def.txt"/>\r
+      <then>\r
+        <echo message="Backup Conf/tools_def.txt to Conf/tools_def.txt.bak" />\r
+        <copy file="Conf/tools_def.txt" tofile="Conf/tools_def.txt.bak"  overwrite="true" />\r
+      </then>\r
+    </if>\r
+    <if>\r
+      <available file="Conf/FrameworkDatabase.db"/>\r
+      <then>\r
+        <echo message="Backup Conf/FrameworkDatabase.db to Conf/FrameworkDatabase.db.bak" />\r
+        <copy file="Conf/FrameworkDatabase.db" tofile="Conf/FrameworkDatabase.db.bak"  overwrite="true" />\r
+      </then>\r
+    </if>\r
+    \r
+    <if>\r
+      <available file="Conf/tools_def.template"/>\r
+      <then>\r
+        <echo message="Copy file from Conf/tools_def.template to Conf/tools_def.txt" />\r
+        <copy file="Conf/tools_def.template" tofile="Conf/tools_def.txt" overwrite="true" />\r
+      </then>\r
+    </if>\r
+\r
+    <if>\r
+      <available file="Conf/target.template"/>\r
+      <then>\r
+        <echo message="Copy file from Conf/target.template to Conf/target.txt" />\r
+        <copy file="Conf/target.template" tofile="Conf/target.txt" overwrite="true" />\r
+      </then>\r
+    </if>\r
+\r
+    <if>\r
+      <available file="Conf/FrameworkDatabase.template"/>\r
+      <then>\r
+        <echo message="Copy file from Conf/FrameworkDatabase.template to Conf/FrameworkDatabase.db" />\r
+        <copy file="Conf/FrameworkDatabase.template" tofile="Conf/FrameworkDatabase.db" overwrite="true" />\r
+      </then>\r
+    </if>\r
+  </target>\r
+\r
   <target name="clean">\r
     <subant target="clean" inheritall="false">\r
       <filelist dir="."\r