X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/7aa1c692da44b5441554522d486e01aa02b27c3a..7fdccdf940e933f4d918cd827ff8f26bfe75fe11:/cookbooks/nominatim/templates/default/update_source.erb diff --git a/cookbooks/nominatim/templates/default/update_source.erb b/cookbooks/nominatim/templates/default/update_source.erb index 49e285df9..ec8f0176b 100644 --- a/cookbooks/nominatim/templates/default/update_source.erb +++ b/cookbooks/nominatim/templates/default/update_source.erb @@ -4,11 +4,12 @@ cd <%= @source_directory %> +git submodule update && ./autogen.sh && ./configure && make -psql -U postgres <%= node[:nominatim][:database][:dbname] %> -c "SELECT version();" >/dev/null 2>&1 -if [ ! $? ]; then +psql -d <%= node[:nominatim][:database][:dbname] %> -c "SELECT version();" >/dev/null 2>&1 +if [[ "$?" == "0" ]]; then ./utils/setup.php --create-functions --create-partition-functions --enable-diff-updates fi