view contrib/make_flys_release/bin/make-importer-package.sh @ 6103:4bbf2ef9bdd8

Themes: Reunited the small parts of default and second theme to default.xml and second.xml again to have valid XML. This is a bit of a pity because the small parts had a better understandable structure. To generate the overview use: $ xsltproc \ contrib/themes2html.xsl \ doc/conf/themes.xml \ > themes.xhtml To make this work you have to create a symlink in conf to itself: $ (cd doc/conf && ln -s . conf) TODO: We have to introduce a EntityResolver in the server code to make the inclusion independent of the current working dir of the server.
author Sascha L. Teichmann <teichmann@intevation.de>
date Sat, 25 May 2013 20:55:11 +0200
parents cff1eea9854f
children e41059fb4073
line wrap: on
line source
#!/bin/bash
set -e

# See README for more information

# The working directory. Resulting tarball will be placed in the directory above.
PKG_DIR=~/tmp/flys-importer
# Path to the flys checkout
FLYS_DIR=~/flys/river/
# Tarball that will be extracted into flys-importer/opt
EXTRAS=$1

rm -fr $PKG_DIR
mkdir -p $PKG_DIR/hydr_morph
mkdir -p $PKG_DIR/geodaesie
mkdir -p $PKG_DIR/opt/lib64
mkdir -p $PKG_DIR/schema
mkdir -p $PKG_DIR/conf

cat > "$PKG_DIR/conf/log4j.properties" << "EOF"
log4j.rootLogger=DEBUG, IMPORTER
log4j.appender.IMPORTER.layout=org.apache.log4j.PatternLayout
log4j.appender.IMPORTER.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
log4j.appender.IMPORTER=org.apache.log4j.RollingFileAppender
log4j.appender.IMPORTER.File=./import.log
log4j.appender.IMPORTER.MaxFileSize=100000KB
log4j.appender.IMPORTER.MaxBackupIndex=10
EOF

cd ${FLYS_DIR}/backend
mvn -f pom-oracle.xml clean compile assembly:single
cp target/backend-1.0-SNAPSHOT-jar-with-dependencies.jar \
    $PKG_DIR/hydr_morph/importer.jar
mvn -f pom.xml clean compile assembly:single
cp target/river-backend-1.0-SNAPSHOT-jar-with-dependencies.jar \
    $PKG_DIR/hydr_morph/importer_psql.jar
cp ${FLYS_DIR}/backend/contrib/shpimporter/*.py $PKG_DIR/geodaesie
cp ${FLYS_DIR}/backend/contrib/run_geo.sh \
    ${FLYS_DIR}/backend/contrib/run_hydr_morph.sh \
    ${FLYS_DIR}/backend/contrib/import_river.sh \
    $PKG_DIR
cp ${FLYS_DIR}/backend/doc/annotation-types.xml $PKG_DIR/conf
if [ -f "$EXTRAS" ]; then
    cd $PKG_DIR
    tar -xzf "$EXTRAS"
fi

cp ${FLYS_DIR}/backend/doc/schema/*.sql $PKG_DIR/schema

cd ${FLYS_DIR}/backend/doc/documentation/de/
make importer-manual.pdf
cp importer-manual.pdf $PKG_DIR

sed -i 's/shpimporter\/shp/geodaesie\/shp/' $PKG_DIR/run_geo.sh

cd $PKG_DIR/..
DATE=$(date +%Y%m%d%H%M)
tar -czf flys-importer_${DATE}.tar.gz flys-importer
sha1sum flys-importer_${DATE}.tar.gz > flys-importer_${DATE}.tar.gz.sha1
echo Package is at: `readlink -f flys-importer_${DATE}.tar.gz`

http://dive4elements.wald.intevation.org