X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/0bbc25c9c5c3ab644d6771ccbd87f26c3d7552bf..6a0d00faf06b4726286bbfcb216c382ca2e23bd0:/utils/update.php?ds=inline diff --git a/utils/update.php b/utils/update.php index 62c07fac..db920826 100755 --- a/utils/update.php +++ b/utils/update.php @@ -69,6 +69,22 @@ if ($aResult['init-updates']) { echo "Does the URL point to a directory containing OSM update data?\n\n"; fail('replication URL not reachable.'); } + // sanity check for pyosmium-get-changes + if (!CONST_Pyosmium_Binary) { + echo "\nCONST_Pyosmium_Binary not configured.\n"; + echo "You need to install pyosmium and set up the path to pyosmium-get-changes\n"; + echo "in your local settings file.\n\n"; + fail('CONST_Pyosmium_Binary not configured'); + } + $aOutput = 0; + $sCmd = CONST_Pyosmium_Binary.' --help'; + exec($sCmd, $aOutput, $iRet); + if ($iRet != 0) { + echo "Cannot execute pyosmium-get-changes.\n"; + echo "Make sure you have pyosmium installed correctly\n"; + echo "and have set up CONST_Pyosmium_Binary to point to pyosmium-get-changes.\n"; + fail('pyosmium-get-changes not found or not usable'); + } $sSetup = CONST_InstallPath.'/utils/setup.php'; $iRet = -1; passthru($sSetup.' --create-functions --enable-diff-updates', $iRet);