diff --git a/build b/build index 8a0ba181..26b73d16 100755 --- a/build +++ b/build @@ -97,11 +97,14 @@ function rcopy(string $src, string $dst) { //Initialize page require_once __DIR__."/system/system.php"; +//Get the build configuration +if(!isset($_SERVER['argv'][1])) + exit("Usage: ./build [configuration]"); //Defines some variables $output = __DIR__."/output/"; $debug_conf = "dev"; -$release_conf = "build"; +$release_conf = $_SERVER['argv'][1]; @@ -187,7 +190,7 @@ if(isset($_SERVER["REDIRECT_URL"])){ exit(); } } ?>'; -$page_src .= load_page("build"); +$page_src .= load_page($release_conf); file_put_contents($output."index.php", $page_src); // Add .htaccess file diff --git a/system/config/build.config.php b/system/config/offline.config.php similarity index 95% rename from system/config/build.config.php rename to system/config/offline.config.php index 41ddf1cd..eddbeec8 100644 --- a/system/config/build.config.php +++ b/system/config/offline.config.php @@ -1,11 +1,11 @@