From: Rusty Russell Date: Thu, 13 Nov 2008 11:27:06 +0000 (+1030) Subject: Junkcode now works. X-Git-Url: https://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=a11ff28997fb00adf9e4a77ccab5648238a65710 Junkcode now works. --- diff --git a/web/staticall.php b/web/staticall.php index 3a6407ff..122c399b 100644 --- a/web/staticall.php +++ b/web/staticall.php @@ -38,8 +38,8 @@ foreach ($modules as $module) { $summary=extract_field('summary',$argv[1].$module); $with_deps="$tar_dir/with-deps/$module.tar.bz2"; $no_deps="$tar_dir/$module.tar.bz2"; - $with_dep_size = round((filesize($argv[2]."/".$with_deps) + 1023) / 1024); - $no_dep_size = round((filesize($argv[2]."/".$no_deps) + 1023) / 1024); + $with_dep_size = round((filesize($argv[3]."/".$with_deps) + 1023) / 1024); + $no_dep_size = round((filesize($argv[3]."/".$no_deps) + 1023) / 1024); ?> @@ -60,18 +60,19 @@ $d->close(); read())) { if ($entry[0] != '.') { - array_push($files, $entry); + array_push($dirs, $entry); } } -sort($files); -foreach ($files as $file) { - $size = round((filesize($argv[2]."/junkcode/".$file) + 1023) / 1024); - echo "\n"; +sort($dirs); +foreach ($dirs as $dir) { + $size = round((filesize($argv[3]."/junkcode/".$dir.".tar.bz2") + 1023) / 1024); + echo "\n"; + echo "\n"; } $d->close(); ?> diff --git a/web/staticjunkcode.php b/web/staticjunkcode.php new file mode 100644 index 00000000..bf342152 --- /dev/null +++ b/web/staticjunkcode.php @@ -0,0 +1,34 @@ + + +

Contents of CCAN

+

+ +

$file (${size}K)
$dir.tar.bz2 (${size}K)Browse contents...
+read())) { + if ($entry[0] != '.') { + array_push($files, $entry); + } +} +$d->close(); +sort($files); + +foreach ($files as $file) { + $size = round((filesize($argv[1]."/".$file) + 1023) / 1024); + ?> + + + + +
"> (K)
+
+