Mercurial > dive4elements > river
comparison flys-backend/contrib/import_river.sh @ 5540:25c2505df28f
Merged
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Wed, 03 Apr 2013 16:00:21 +0200 |
parents | 7c646d4d5103 |
children | 673f68bb19a4 |
comparison
equal
deleted
inserted
replaced
5539:8d0af912351c | 5540:25c2505df28f |
---|---|
154 if [ ! -r $1 ]; then | 154 if [ ! -r $1 ]; then |
155 echo "Could not open $1 please ensure it exists and is readable" | 155 echo "Could not open $1 please ensure it exists and is readable" |
156 fi | 156 fi |
157 | 157 |
158 GEW_FILE="$1" | 158 GEW_FILE="$1" |
159 RIVER_NAME=$(grep "Gew.sser" "$1" | awk '{print $2}') | 159 RIVER_NAME=$(grep "Gew.sser" "$1" | sed 's/Gew.sser: //') |
160 DATE=$(date +%Y.%m.%d_%H%M) | 160 DATE=$(date +%Y.%m.%d_%H%M) |
161 LOG_DIR=${LOG}/${RIVER_NAME}-$DATE | 161 LOG_DIR=${LOG}/`basename $GEW_FILE .gew`-$DATE |
162 mkdir -p ${LOG_DIR} | 162 mkdir -p ${LOG_DIR} |
163 | 163 |
164 if [ "$POSTGRES" = "TRUE" ]; then | 164 if [ "$POSTGRES" = "TRUE" ]; then |
165 JAR=$(echo "$JAR" | sed 's/importer/importer_psql/') | 165 JAR=$(echo "$JAR" | sed 's/importer/importer_psql/') |
166 if [ ! -r "$JAR" ]; then | 166 if [ ! -r "$JAR" ]; then |