test for existance of country grid in cmake already

Given that the file potentially gets installed, it needs to be
present during build time already. Checking during the import
is too late.
This commit is contained in:
Sarah Hoffmann
2021-02-10 10:40:36 +01:00
parent 745ae02f47
commit 99dcd10d3f
2 changed files with 12 additions and 6 deletions

View File

@@ -166,11 +166,6 @@ class SetupFunctions
// Try accessing the C module, so we know early if something is wrong
$this->checkModulePresence(); // raises exception on failure
if (!file_exists(CONST_DataDir.'/country_osm_grid.sql.gz')) {
echo 'Error: you need to download the country_osm_grid first:';
echo "\n wget -O ".CONST_DataDir."/country_osm_grid.sql.gz https://www.nominatim.org/data/country_grid.sql.gz\n";
exit(1);
}
$this->pgsqlRunScriptFile(CONST_DataDir.'/country_name.sql');
$this->pgsqlRunScriptFile(CONST_DataDir.'/country_osm_grid.sql.gz');