summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'import.all.php')
-rw-r--r--import.all.php43
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