Tweak this horror show.

This commit includes some tweaks to point the scanner at specific
directories for the tcf and recommenders.incubator projects. The
directory identification algorithm was also tweaked to avoid registering
duplicates.
diff --git a/downloads/classes/functions.php b/downloads/classes/functions.php
index 02a1b10..40a0842 100755
--- a/downloads/classes/functions.php
+++ b/downloads/classes/functions.php
@@ -41,10 +41,6 @@
 	$xml = simplexml_load_file("https://www.eclipse.org/projects/xml/projects.php");
 	
 	// Hack special cases...
-	$downloadFunction("technology.linux-distros", "/home/data/httpd/download.eclipse.org/technology/linuxtools/");
-//	$downloadFunction("technology.linux-distros", "/home/data/httpd/archive.eclipse.org/technology/linuxtools/");
-	$namespaceFunction("technology.linux-distros", "org.eclipse.linuxtools.");
-	
 	$downloadFunction("modeling.emf.mwe", "/home/data/httpd/download.eclipse.org/modeling/emft/mwe/");
 //	$downloadFunction("modeling.emf.mwe", "/home/data/httpd/archive.eclipse.org/modeling/emft/mwe/");
 	$namespaceFunction("modeling.emf.mwe", "org.eclipse.emf.mwe.");
@@ -75,6 +71,8 @@
 	$downloadFunction("modeling.viatra", '/home/data/httpd/download.eclipse.org/viatra2');
 	$namespaceFunction('modeling.viatra', 'org.eclipse.viatra2');
 	
+	$downloadFunction("tools.cdt.tcf", '/home/data/httpd/download.eclipse.org/tools/tcf');	
+	$downloadFunction("technology.recommenders.incubator", "/home/data/httpd/download.eclipse.org/recommenders.incubator");
 	
 	parseProjectHierarchy($xml, $downloadFunction, $namespaceFunction);
 }
@@ -87,8 +85,12 @@
 		/*
 		 * Consider paths that are similar to the project name,
 		 * e.g. 'modeling.emft.emf-client' is in downloads/emfclient
+		 * To avoid duplication, only consider the simplified path
+		 * if it is actually different from the original.
 		 */
-		addProjectPaths(preg_replace('/[_\-]/','',$id), $downloadFunction, $namespaceFunction);
+		$simple = preg_replace('/[_\-]/','',$id);
+		if (strcmp($simple, $id) != 0)
+		  addProjectPaths($simple, $downloadFunction, $namespaceFunction);
 	}
 }
 
diff --git a/downloads/scan_all.php b/downloads/scan_all.php
index b45c358..125991c 100644
--- a/downloads/scan_all.php
+++ b/downloads/scan_all.php
@@ -28,7 +28,7 @@
 trace_file_info(__FILE__);
 
 $tmp = "/tmp";
-$home = "/home/data/users/wbeaton/git/org.eclipse.dash.dashboard/downloads";
+$home = dirname(__FILE__);
 $findjars = "$home/findjars.sh";
 /*
  * Add a grep pipe to the scan command to strip comments
@@ -40,6 +40,7 @@
 $output = "/home/data/httpd/writable/projects/ip-scans";
 
 echo "echo \"# Project/Directory mapping\" > $output/mapping.txt\n";
+$map = array();
 parseProjects("gatherDirectories", "doNothing");
 foreach($map as $project => $directories) {
 	$file = "$tmp/$project-list.txt";