Fixed `xfw build` + added statistics + log
This commit is contained in:
parent
93653d8680
commit
b98a8419d4
|
@ -33,25 +33,40 @@
|
|||
/* [1] Builds project's base file structure
|
||||
=========================================================*/
|
||||
/* (1) Copy from src/files */
|
||||
echo "(1) Building file structure\n";
|
||||
shell_exec("cp -r ".__ROOT__."/src/files/* ".$this->root);
|
||||
|
||||
|
||||
|
||||
/* [2] Browse each package to load
|
||||
=========================================================*/
|
||||
foreach($this->packages as $package=>$version){
|
||||
$path = "/$package/$version";
|
||||
echo "(2) Building packages\n";
|
||||
$count = 1;
|
||||
|
||||
foreach($this->packages as $package=>$version){
|
||||
$path = "$package/$version";
|
||||
|
||||
echo " ($count) $package:$version\n";
|
||||
/* (1) Copy package folder if it exists */
|
||||
if( file_exists(__ROOT__."/src/packages$path/") && is_dir(__ROOT__."/src/packages$path/") && count(scandir(__ROOT__."/src/packages$path/")) > 2 )
|
||||
shell_exec("cp -r ".__ROOT__."/src/packages$path ".$this->root."/build/$package");
|
||||
if( file_exists(__ROOT__."/src/packages/$path") && is_dir(__ROOT__."/src/packages/$path") && count(scandir(__ROOT__."/src/packages/$path")) > 2 )
|
||||
shell_exec("cp -r ".__ROOT__."/src/packages/$path ".$this->root."/build/$package");
|
||||
|
||||
/* (2) Copy package config if it exists */
|
||||
if( file_exists(__ROOT__."/src/config$path/") && is_dir(__ROOT__."/src/config$path/") && count(scandir(__ROOT__."/src/config$path/")) > 2 )
|
||||
shell_exec("cp -r ".__ROOT__."/src/config$path/* ".$this->root."/config/");
|
||||
if( file_exists(__ROOT__."/src/config/$path") && is_dir(__ROOT__."/src/config/$path") && count(scandir(__ROOT__."/src/config/$path")) > 2 )
|
||||
shell_exec("cp -r ".__ROOT__."/src/config/$path/* ".$this->root."/config/");
|
||||
|
||||
$count++;
|
||||
}
|
||||
|
||||
echo "(*) Build finished\n";
|
||||
|
||||
/* [3] Start stats
|
||||
=========================================================*/
|
||||
echo "\n\nStatistics:\n";
|
||||
echo shell_exec("du -hs ".$this->root."/*;");
|
||||
echo "--\n";
|
||||
echo shell_exec("du -hs ".$this->root."/;");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"2.0"
|
||||
]
|
||||
},
|
||||
"2.1": {
|
||||
"2.2": {
|
||||
"error": [
|
||||
"2.0"
|
||||
],
|
||||
|
@ -59,7 +59,7 @@
|
|||
}
|
||||
},
|
||||
"installed": {
|
||||
"api": "2.1",
|
||||
"api": "2.2",
|
||||
"error": "2.0",
|
||||
"http": "1.0",
|
||||
"orm": "0.8.2",
|
||||
|
|
Loading…
Reference in New Issue