Added sorting and removal of duplicates from TSV files.
--- a/common/build.xml Mon Jul 13 18:03:32 2009 +0100
+++ b/common/build.xml Tue Jul 14 10:47:57 2009 +0100
@@ -818,7 +818,20 @@
</exec>
</sequential>
</for>
-
+
+ <!-- Now iterate through the generated TSVs to sort them and remove duplicates -->
+ <for param="tsv">
+ <path>
+ <fileset dir="${build.log.dir}/releaseables">
+ <include name="**/*.tsv"/>
+ </fileset>
+ </path>
+ <sequential>
+ <exec executable="perl" input="@{tsv}" output="@{tsv}">
+ <arg value="${sf.common.config.dir}/tools/sortUnique.pl"/>
+ </exec>
+ </sequential>
+ </for>
</target>
<target name="sf-run-evalid">
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/common/tools/sortUnique.pl Tue Jul 14 10:47:57 2009 +0100
@@ -0,0 +1,13 @@
+#!perl -w
+use strict;
+# Sorts the input, removes duplicates, and outputs it
+
+# Read it
+my @content = <>;
+
+# Sort it, and grep to remove duplicates
+my $previous = "\n\n";
+@content = grep {$_ ne $previous && ($previous = $_, 1) } sort @content;
+
+# Write it
+print @content;