Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWayne Beaton2016-05-26 15:40:03 +0000
committerWayne Beaton2016-05-26 15:40:03 +0000
commitc636a4807152876c3b35a0d944522afe4b67dd8f (patch)
treec817e8d13f7f3a127759ad9dadda3eaec152b207
parent96b1c16967c0cc6303042b55205bcd7a670628a2 (diff)
downloadorg.eclipse.dash.dashboard-master.tar.gz
org.eclipse.dash.dashboard-master.tar.xz
org.eclipse.dash.dashboard-master.zip
Tweak this horror show.HEADmaster
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.
-rwxr-xr-xdownloads/classes/functions.php12
-rw-r--r--downloads/scan_all.php3
2 files changed, 9 insertions, 6 deletions
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 @@ function parseProjects($downloadFunction, $namespaceFunction) {
$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 @@ function parseProjects($downloadFunction, $namespaceFunction) {
$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 @@ function parseProjectHierarchy(&$parent, $downloadFunction, $namespaceFunction)
/*
* 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 @@ require_once (dirname(__FILE__) . '/classes/debug.php');
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 @@ $scan = "php $home/scan.php | grep -v ^#";
$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";

Back to the top