Author: yurize
Date: Fri Nov  9 07:57:32 2012
New Revision: 1407372

URL: http://svn.apache.org/viewvc?rev=1407372&view=rev
Log:
Adds ant script to migrate attachments to the newer version.

Added:
    incubator/wave/trunk/migrate-attachments.xml

Added: incubator/wave/trunk/migrate-attachments.xml
URL: 
http://svn.apache.org/viewvc/incubator/wave/trunk/migrate-attachments.xml?rev=1407372&view=auto
==============================================================================
--- incubator/wave/trunk/migrate-attachments.xml (added)
+++ incubator/wave/trunk/migrate-attachments.xml Fri Nov  9 07:57:32 2012
@@ -0,0 +1,41 @@
+<!--
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Author: [email protected] (Yuri Zelikov)
+ -->
+
+<project name="migrate-attachments" default="migrate">
+  <description>Migrates attachments to a newer version.</description>
+
+  <property file="server.config" />
+  <property name="attachments_tmp" value="attachments_tmp" />
+
+  <target name="migrate" description="Migrates attachments to a newer version 
by moving all the
+    files into the root folder.">
+    <delete dir="${attachments_tmp}" failonerror="false" />
+    <mkdir dir="${attachments_tmp}" />
+    <copy todir="${attachments_tmp}" flatten="true" includeemptydirs="false">
+      <fileset dir="${attachment_store_directory}">
+        <include name="**/**/*" />
+      </fileset>
+    </copy>
+    <delete dir="${attachment_store_directory}" failonerror="true" />
+    <mkdir dir="${attachment_store_directory}" />
+    <copy todir="${attachment_store_directory}">
+      <fileset dir="${attachments_tmp}">
+        <include name="**/**/*" />
+      </fileset>
+    </copy>
+    <delete dir="${attachments_tmp}" failonerror="true" />
+  </target>
+</project>
\ No newline at end of file


Reply via email to