Mercurial > dive4elements > river
changeset 5066:8208df10df79 dami
Update run example scripts to work with the new packaging
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 20 Feb 2013 18:29:02 +0100 |
parents | a56efdfcab17 |
children | be27a2bb7ca2 |
files | flys-backend/contrib/run_geo.sh flys-backend/contrib/run_hydr_morph.sh |
diffstat | 2 files changed, 21 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-backend/contrib/run_geo.sh Wed Feb 20 18:26:57 2013 +0100 +++ b/flys-backend/contrib/run_geo.sh Wed Feb 20 18:29:02 2013 +0100 @@ -27,9 +27,19 @@ SKIP_UESG=0 SKIP_DGM=0 +# There should be no need to change anything below this line + DIR=`dirname $0` DIR=`readlink -f "$DIR"` +OPTIONAL_LIBS="${DIR}"/../opt +if [ -d "$OPTIONAL_LIBS" ]; then + export PATH="$OPTIONAL_LIBS/bin:$PATH" + export LD_LIBRARY_PATH="$OPTIONAL_LIBS/lib:$LD_LIBRARY_PATH" + export LD_LIBRARY_PATH="$OPTIONAL_LIBS/lib64:$LD_LIBRARY_PATH" + export PYTHONPATH="$OPTIONAL_LIBS/lib/python2.6/site-packages:$PYTHONPATH" +fi + exec python $DIR/shpimporter/shpimporter.py \ --directory $RIVER_PATH \ --river_name $RIVER_NAME \
--- a/flys-backend/contrib/run_hydr_morph.sh Wed Feb 20 18:26:57 2013 +0100 +++ b/flys-backend/contrib/run_hydr_morph.sh Wed Feb 20 18:29:02 2013 +0100 @@ -8,6 +8,7 @@ BACKEND_PORT="1521" BACKEND_NAME="XE" LOG4J_CONFIG="conf/log4j.properties" +JAR="hydr_morph/importer.jar" ##################################################################### @@ -54,25 +55,17 @@ MIN_MEMORY="1024m" -########################## Importer Settings ######################## -APP="de.intevation.flys.importer.Importer" -DIR=`dirname $0` -DIR=`readlink -f "$DIR/.."` -##################################################################### - +######################### Run Importer ############################## +OPTIONAL_LIBS="${DIR}"/../opt +if [ -d "$OPTIONAL_LIBS" ]; then + export PATH="$OPTIONAL_LIBS/bin:$PATH" + export LD_LIBRARY_PATH="$OPTIONAL_LIBS/lib:$LD_LIBRARY_PATH" + export LD_LIBRARY_PATH="$OPTIONAL_LIBS/lib64:$LD_LIBRARY_PATH" +fi -########################## Collect required libraries ############### -CLASSPATH= -for l in `find "$DIR/lib" -name \*.jar -print`; do - CLASSPATH=$CLASSPATH:$l -done +export LC_ALL=de_DE@euro # Workaround encoding problem -export CLASSPATH -##################################################################### - - -######################### Run Importer ############################## -exec java \ +exec java -jar \ -Xmx$MIN_MEMORY \ -server \ -Dlog4j.configuration=file://`readlink -f $LOG4J_CONFIG` \ @@ -108,4 +101,4 @@ -Dflys.backend.url=$BACKEND_URL \ -Dflys.backend.driver=$BACKEND_DB_DRIVER \ -Dflys.backend.dialect=$BACKEND_DB_DIALECT \ - $APP + $JAR