mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-11-30 02:07:52 +03:00
15a1666f8a
As we can't refer to the project root dir in the module path, the module path may now also be a relative directory which is then taken as being relative to the project root path. Moves the checkModulePresence() function into the Setup class, so that it can work on the computed absolute module path.
17 lines
351 B
PHP
Executable File
17 lines
351 B
PHP
Executable File
<?php
|
|
|
|
function checkInFile($sOSMFile)
|
|
{
|
|
if (!isset($sOSMFile)) {
|
|
fail('missing --osm-file for data import');
|
|
}
|
|
|
|
if (!file_exists($sOSMFile)) {
|
|
fail('the path supplied to --osm-file does not exist');
|
|
}
|
|
|
|
if (!is_readable($sOSMFile)) {
|
|
fail('osm-file "' . $aCMDResult['osm-file'] . '" not readable');
|
|
}
|
|
}
|