diff options
author | Eudyptula <eitan@mosenkis.net> | 2009-06-21 15:51:25 -0400 |
---|---|---|
committer | Eudyptula <eitan@mosenkis.net> | 2009-06-21 15:51:25 -0400 |
commit | 8ca317c1a77759f38c9ec304291912b6808055ea (patch) | |
tree | 9f302f27266aecc576d4cb40a6f91e3a453ab728 /pkglist.php | |
parent | Finished infrastructure for 1st gen. build wizard, enhanced backend logging (diff) | |
download | ingenue-8ca317c1a77759f38c9ec304291912b6808055ea.tar.gz ingenue-8ca317c1a77759f38c9ec304291912b6808055ea.tar.bz2 ingenue-8ca317c1a77759f38c9ec304291912b6808055ea.zip |
Did some cleanup and added a Packages file parser and simple package list printer script
Diffstat (limited to 'pkglist.php')
-rwxr-xr-x | pkglist.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pkglist.php b/pkglist.php new file mode 100755 index 0000000..1be1dbb --- /dev/null +++ b/pkglist.php @@ -0,0 +1,20 @@ +#!/usr/bin/php +<?php +require_once(dirname(__FILE__).'/shared/include/includes.php'); // USE __DIR__ in 5.3.0 +require_once(SHARED.'/config.php'); +require_once(SHARED.'/include/dbinit.php'); +$pdo=&$S['pdo']; +$r=$pdo->query('SELECT * FROM `profiles`'); +while ($p=$r->fetch(PDO::FETCH_ASSOC)) { + $p=new sql_profile($p); + echo ($p->name?$p->name:$p->pkgdir)."\n"; + $packages=$p->get_packages(); + foreach ($packages as $cat => $pkg) { + foreach ($pkg as $name => $vers) { + foreach ($vers as $ver => $attrs) { + echo ($attrs['masked']?color('[MASKED] ', 'red'):'')."$cat/$name-$ver: ".$attrs['description']."\n"; + } + } + } +} +?> |