[Dive4elements-commits] [PATCH] Make OPTIONAL_LIBS overwritable and fix geo importer call
Wald Commits
scm-commit at wald.intevation.org
Mon Mar 4 17:08:49 CET 2013
# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1362413294 -3600
# Node ID db1a000a21a9d2eb98218c4068d5383631d278ce
# Parent 650f94ec3122ff680980ba7670d00d8766c9ff7e
Make OPTIONAL_LIBS overwritable and fix geo importer call
diff -r 650f94ec3122 -r db1a000a21a9 flys-backend/contrib/import_river.sh
--- a/flys-backend/contrib/import_river.sh Mon Mar 04 12:55:49 2013 +0100
+++ b/flys-backend/contrib/import_river.sh Mon Mar 04 17:08:14 2013 +0100
@@ -38,7 +38,10 @@
MIN_MEMORY="8024m"
-OPTIONAL_LIBS="${DIR}"/../opt
+if [ -z "$OPTIONAL_LIBS" ]; then
+ OPTIONAL_LIBS="${DIR}"/../opt
+fi
+
if [ -d "$OPTIONAL_LIBS" ]; then
export PATH="$OPTIONAL_LIBS/bin:$PATH"
export LD_LIBRARY_PATH="$OPTIONAL_LIBS/lib:$LD_LIBRARY_PATH"
@@ -319,14 +322,19 @@
echo Importing Geographic data.
echo Logging into: $LOG_FILE
- python $DIR/geodaesie/shpimporter.py \
+ RIVER_PATH=$(grep "WSTDatei:" "$GEW_FILE" | awk '{print $2}')
+ RIVER_PATH=$(dirname "$RIVER_PATH")/../..
+ RIVER_PATH=$(readlink -f "$RIVER_PATH")
+
+ exec python $(dirname $0)/geodaesie/shpimporter.py \
--directory $RIVER_PATH \
--river_name $RIVER_NAME \
--ogr_connection "$OGR_CONNECTION" \
--host $HOST \
--user $USER \
--password $PASS \
- --verbose 2 2>&1 > "$LOG_FILE"
+ --verbose 1 \
+ > "$LOG_FILE" 2>&1
}
More information about the Dive4elements-commits
mailing list