# HG changeset patch # User Tom Gottfried # Date 1376063832 -7200 # Node ID 0b2c9de5e6816ec8397759ad0bac17a776ea85b4 # Parent 1e430c0ec28598afe6d4a7b4bb1dda11070f8dd8 Geo-importer: use commandline-argument instead of configuration for river selection. diff -r 1e430c0ec285 -r 0b2c9de5e681 backend/contrib/run_geo.sh --- a/backend/contrib/run_geo.sh Fri Aug 09 17:27:16 2013 +0200 +++ b/backend/contrib/run_geo.sh Fri Aug 09 17:57:12 2013 +0200 @@ -1,9 +1,5 @@ #!/bin/sh -# Required -RIVER_PATH="/vol1/projects/Geospatial/flys-3.0/testdaten/Gewaesser/Saar" -RIVER_NAME="Saar" - # Set this to your target database for Oracle HOST=localhost BACKEND_NAME="XE" @@ -34,6 +30,12 @@ export LC_ALL=de_DE@euro # There should be no need to change anything below this line +GEW_FILE="$1" +RIVER_NAME=$(grep "Gew.sser" "$1" | sed 's/Gew.sser: //') + +RIVER_PATH=$(grep "WSTDatei:" "$GEW_FILE" | awk '{print $2}') +RIVER_PATH=$(dirname "$RIVER_PATH")/../.. +RIVER_PATH=$(readlink -f "$RIVER_PATH") DIR=`dirname $0` DIR=`readlink -f "$DIR"`