summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-04-16 13:33:49 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-04-16 13:33:49 -0400
commit1799f4bead5cc0cc155543d641b0254a0e037308 (patch)
tree0307850a2589596406537ae91ffebea56239f60b
parent0336259f342131562c30f59b34ec28f2df8bf82d (diff)
better detection of repos
-rw-r--r--index.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/index.php b/index.php
index 5c0c53b..4e24aa5 100644
--- a/index.php
+++ b/index.php
@@ -57,11 +57,14 @@ function classify($root, $dirname, $filename) {
$classes = array();
if (count($parts) == 0) {
// in the top-level
- if (in_array($filename, $repos_arch_project )) { array_push($classes, 'repo', 'arch'); }
- if (in_array($filename, $repos_para_project )) { array_push($classes, 'repo', 'para'); }
- if (in_array($filename, $repos_arch_community)) { array_push($classes, 'repo', 'arch', 'community'); }
- if (in_array($filename, $repos_para_community)) { array_push($classes, 'repo', 'para', 'community'); }
- if ($filename[0] === '~' ) { array_push($classes, 'repo', 'para', 'community'); }
+ if (is_dir($filename.'/os')) {
+ array_push($classes, 'repo');
+ if (in_array($filename, $repos_arch_project )) { array_push($classes, 'arch'); }
+ if (in_array($filename, $repos_para_project )) { array_push($classes, 'para'); }
+ if (in_array($filename, $repos_arch_community)) { array_push($classes, 'arch', 'community'); }
+ if (in_array($filename, $repos_para_community)) { array_push($classes, 'para', 'community'); }
+ if ($filename[0] === '~' ) { array_push($classes, 'para', 'community'); }
+ }
} elseif ($dirname == "pool" || $dirname == "sources") {
switch($filename) {
case "packages": array_push($classes, 'pool', 'arch' ); break;