comparison flys-backend/contrib/import_river.sh @ 5461:16c14e5ab00f

merge
author Tom Gottfried <tom.gottfried@intevation.de>
date Wed, 27 Mar 2013 15:38:07 +0100
parents 7c646d4d5103
children 673f68bb19a4
comparison
equal deleted inserted replaced
5460:c2bd97cd127f 5461:16c14e5ab00f
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

http://dive4elements.wald.intevation.org