From: K Rahul Reddy Date: Fri, 12 Jun 2020 13:34:48 +0000 (+0530) Subject: Added setup-website option X-Git-Tag: v3.6.0~118^2~4 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/6c406124dd416ec62fc2ce0a4d07d597d3ae53f3 Added setup-website option --- diff --git a/cmake/website.tmpl b/cmake/website.tmpl index 0257aa10..c5173956 100755 --- a/cmake/website.tmpl +++ b/cmake/website.tmpl @@ -1,3 +1,3 @@ removeFlatnodeFile(); } + /** + * Setup settings_test.php in the build/settings directory from build/.env file + * + * @return null + */ + public function setupWebsite() + { + $rOutputFile = fopen(CONST_InstallPath.'/settings/settings-frontend.php', 'w'); + + // Currently using CONST_BasePath and CONST_InstallPath. + // Once dotenv is setup, getenv() can be used, or another + // alternate option is to build settings_test.php using cmake. + + fwrite($rOutputFile, "createCountryNames($aCMDResult); } +if ($aCMDResult['setup-website'] || $aCMDResult['all']) { + $bDidSomething = true; + $oSetup->setupWebsite(); +} + // ****************************************************** // If we did something, repeat the warnings if (!$bDidSomething) {