diff options
author | Steve Dibb <beandog@gentoo.org> | 2009-12-15 20:44:20 +0000 |
---|---|---|
committer | Steve Dibb <beandog@gentoo.org> | 2009-12-15 20:44:20 +0000 |
commit | 09088aa9aee870ff3e9dc490683976d224a68b4b (patch) | |
tree | 99637a9cd8193a2c937a3efd0e09d6726055916a /import.all.php | |
download | znurt-org-backend-09088aa9aee870ff3e9dc490683976d224a68b4b.tar.gz znurt-org-backend-09088aa9aee870ff3e9dc490683976d224a68b4b.tar.bz2 znurt-org-backend-09088aa9aee870ff3e9dc490683976d224a68b4b.zip |
initial commit
git-svn-id: file:///var/svn/portage@1 3218660a-b0cf-4799-a991-8ddcc5b9e0f3
Diffstat (limited to 'import.all.php')
-rw-r--r-- | import.all.php | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/import.all.php b/import.all.php new file mode 100644 index 0000000..337c6cc --- /dev/null +++ b/import.all.php @@ -0,0 +1,43 @@ +<? + + ini_set('memory_limit', -1); + + $verbose = true; + + $base = true; + $packages = true; + $ebuilds = true; + $metadata = true; + + $arr_import['base'] = array('arches', 'eclasses', 'herds', 'licenses', 'use_flags'); + $arr_import['packages'] = array('categories', 'packages'); + $arr_import['ebuilds'] = array('ebuilds'); + $arr_import['metadata'] = array('ebuild_metadata', 'ebuild_arch', 'ebuild_homepage', 'ebuild_license', 'package_mask', 'ebuild_mask', 'ebuild_ev'); + $arr_import['final'] = array('final'); + + + foreach($arr_import as $key => $arr) { + if($$key) { + foreach($arr as $file) { +// if($verbose) + echo "[import] $file\n"; + include "import.$file.php"; + } + } + } + + function memory_usage() { + $mem_usage = memory_get_usage(true); + + if ($mem_usage < 1024) + $str = $mem_usage."b"; + else + $str = round($mem_usage/1024,2)."kb"; +// else +// $str = round($mem_usage/1048576,2)." megabytes"; + + return $str; + } + + +?>
\ No newline at end of file |