]> git.openstreetmap.org Git - nominatim.git/blobdiff - utils/update.php
moving functions from setup.php to a lib file in lib/setup_functions.php and change...
[nominatim.git] / utils / update.php
index 46f700621c1857198af78deefe268f7a8a7056d4..fd361eb8f52afc50dc1d79a410a761947b0f5837 100755 (executable)
@@ -3,8 +3,10 @@
 
 require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
 require_once(CONST_BasePath.'/lib/init-cmd.php');
+include_once(CONST_BasePath.'/lib/setup_functions.php');
 ini_set('memory_limit', '800M');
 
+
 # (long-opt, short-opt, min-occurs, max-occurs, num-arguments, num-arguments, type, help)
 
 $aCMDOptions
@@ -99,12 +101,7 @@ if ($aResult['init-updates']) {
         fail('pyosmium-get-changes not found or not usable');
     }
     if (!$aResult['no-update-functions']) {
-        $sSetup = CONST_InstallPath.'/utils/setup.php';
-        $iRet = -1;
-        passthru($sSetup.' --create-functions --enable-diff-updates', $iRet);
-        if ($iRet != 0) {
-            fail('Error running setup script');
-        }
+        createFunctions($aCMDResult);
     }
 
     $sDatabaseDate = getDatabaseDate($oDB);