From f13286a50dd51f2742b29f9fc44ddb05acaeb9b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Rodrigo?= Date: Wed, 22 Feb 2023 22:13:26 +0100 Subject: [PATCH] Run scripts from project dir --- README.md | 2 -- copy_table_from_osm_to_cadastre.sh | 3 +-- load_osm_france_db.sh | 3 +-- update_table_infos_communes.sh | 3 +-- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index db6fa21..627bb45 100644 --- a/README.md +++ b/README.md @@ -44,8 +44,6 @@ sudo -u postgres -s "./create_base.sh" ## Chargement des données OSM -Se placer dans le répertoire `DATA_DIR`, et appeler les scripts depuis là. - Charger des données OSM depuis un pbf, France entière ou un extract plus petit. ``` load_osm_france_db.sh diff --git a/copy_table_from_osm_to_cadastre.sh b/copy_table_from_osm_to_cadastre.sh index e9bf796..3005980 100755 --- a/copy_table_from_osm_to_cadastre.sh +++ b/copy_table_from_osm_to_cadastre.sh @@ -2,8 +2,7 @@ set -e -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -source $SCRIPT_DIR/config +source config set -e diff --git a/load_osm_france_db.sh b/load_osm_france_db.sh index 36e0c97..7f9ac8e 100755 --- a/load_osm_france_db.sh +++ b/load_osm_france_db.sh @@ -2,8 +2,7 @@ set -e -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -source $SCRIPT_DIR/config +source config PBF_URL=${1:-http://download.openstreetmap.fr/extracts/merge/france_metro_dom_com_nc.osm.pbf} PBF_FILE=$(basename "$PBF_URL") diff --git a/update_table_infos_communes.sh b/update_table_infos_communes.sh index 4ebc5f7..043114d 100755 --- a/update_table_infos_communes.sh +++ b/update_table_infos_communes.sh @@ -2,7 +2,6 @@ set -e -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd $SCRIPT_DIR +source config $pgsql_OSM -f ./sql/update_table_infos_communes.sql