comparison contrib/make_flys_release/bin/make-importer-package.sh @ 5379:61bf64b102bc mapgenfix

Merge with default branch
author Christian Lins <christian.lins@intevation.de>
date Fri, 22 Mar 2013 11:25:54 +0100
parents 29d79741c2fe
children 5422a798f105
comparison
equal deleted inserted replaced
5175:cfc5540a4eec 5379:61bf64b102bc
1 #!/bin/bash
2 set -e
3
4 # See README for more information
5
6 # The working directory. Resulting tarball will be placed in the directory above.
7 PKG_DIR=/tmp/flys-importer
8 # Default conf
9 CONF_DIR=/path/to/conf/dir
10 # Path to the flys checkout
11 FLYS_DIR=/path/to/flys/root
12 # Tarball that will be extracted into flys-imprter/opt
13 EXTRAS=$1
14
15 rm -fr $PKG_DIR
16 mkdir -p $PKG_DIR/hydr_morph
17 mkdir -p $PKG_DIR/geodaesie
18 mkdir -p $PKG_DIR/opt/lib64
19 mkdir -p $PKG_DIR/schema
20 mkdir -p $PKG_DIR/conf
21
22 cat > "$PKG_DIR/conf/log4j.properties" << "EOF"
23 log4j.rootLogger=DEBUG, IMPORTER
24 log4j.appender.IMPORTER.layout=org.apache.log4j.PatternLayout
25 log4j.appender.IMPORTER.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
26 log4j.appender.IMPORTER=org.apache.log4j.RollingFileAppender
27 log4j.appender.IMPORTER.File=./import.log
28 log4j.appender.IMPORTER.MaxFileSize=100000KB
29 log4j.appender.IMPORTER.MaxBackupIndex=10
30 EOF
31
32 cd ${FLYS_DIR}/flys-backend
33 mvn -f pom-oracle.xml clean compile assembly:single
34 cp target/flys-backend-1.0-SNAPSHOT-jar-with-dependencies.jar \
35 $PKG_DIR/hydr_morph/importer.jar
36 mvn -f pom.xml clean compile assembly:single
37 cp target/flys-backend-1.0-SNAPSHOT-jar-with-dependencies.jar \
38 $PKG_DIR/hydr_morph/importer_psql.jar
39 cp ${FLYS_DIR}/flys-backend/contrib/shpimporter/*.py $PKG_DIR/geodaesie
40 cp ${FLYS_DIR}/flys-backend/contrib/run_geo.sh \
41 ${FLYS_DIR}/flys-backend/contrib/run_hydr_morph.sh \
42 ${FLYS_DIR}/flys-backend/contrib/import_river.sh \
43 $PKG_DIR
44 cp ${FLYS_DIR}/flys-backend/doc/annotation-types.xml $PKG_DIR/conf
45 if [ -f "$EXTRAS" ]; then
46 cd $PKG_DIR
47 tar -xzf "$EXTRAS"
48 fi
49
50 cp ${FLYS_DIR}/flys-backend/doc/schema/*.sql $PKG_DIR/schema
51 cp ${FLYS_DIR}/flys-backend/doc/documentation/de/importer-manual.pdf $PKG_DIR
52
53 sed -i 's/shpimporter\/shp/geodaesie\/shp/' $PKG_DIR/run_geo.sh
54
55 cd $PKG_DIR/..
56 DATE=$(date +%Y%m%d%H%m)
57 tar -czf flys-importer_${DATE}.tar.gz flys-importer
58 sha1sum flys-importer_${DATE}.tar.gz > flys-importer_${DATE}.tar.gz.sha1
59 echo Package is at: `readlink -f flys-importer_${DATE}.tar.gz`

http://dive4elements.wald.intevation.org