aheinecke@5097: #!/bin/bash aheinecke@5097: set -e aheinecke@5097: aheinecke@5097: # See README for more information aheinecke@5097: aheinecke@5097: # The working directory. Resulting tarball will be placed in the directory above. tom@5520: PKG_DIR=~/tmp/flys-importer aheinecke@5097: # Path to the flys checkout tom@5855: FLYS_DIR=~/flys/river/ tom@5855: # Tarball that will be extracted into flys-importer/opt aheinecke@5179: EXTRAS=$1 aheinecke@5097: aheinecke@5097: rm -fr $PKG_DIR aheinecke@5097: mkdir -p $PKG_DIR/hydr_morph aheinecke@5097: mkdir -p $PKG_DIR/geodaesie aheinecke@5097: mkdir -p $PKG_DIR/opt/lib64 aheinecke@5097: mkdir -p $PKG_DIR/schema aheinecke@5179: mkdir -p $PKG_DIR/conf aheinecke@5179: aheinecke@5179: cat > "$PKG_DIR/conf/log4j.properties" << "EOF" aheinecke@5179: log4j.rootLogger=DEBUG, IMPORTER aheinecke@5179: log4j.appender.IMPORTER.layout=org.apache.log4j.PatternLayout aheinecke@5179: log4j.appender.IMPORTER.layout.ConversionPattern=%d [%t] %-5p %c - %m%n aheinecke@5179: log4j.appender.IMPORTER=org.apache.log4j.RollingFileAppender aheinecke@5179: log4j.appender.IMPORTER.File=./import.log aheinecke@5179: log4j.appender.IMPORTER.MaxFileSize=100000KB aheinecke@5179: log4j.appender.IMPORTER.MaxBackupIndex=10 aheinecke@5179: EOF aheinecke@5097: tom@5855: cd ${FLYS_DIR}/backend aheinecke@5097: mvn -f pom-oracle.xml clean compile assembly:single tom@5855: cp target/backend-1.0-SNAPSHOT-jar-with-dependencies.jar \ aheinecke@5097: $PKG_DIR/hydr_morph/importer.jar aheinecke@5172: mvn -f pom.xml clean compile assembly:single tom@5855: cp target/river-backend-1.0-SNAPSHOT-jar-with-dependencies.jar \ aheinecke@5172: $PKG_DIR/hydr_morph/importer_psql.jar tom@5855: cp ${FLYS_DIR}/backend/contrib/shpimporter/*.py $PKG_DIR/geodaesie tom@5855: cp ${FLYS_DIR}/backend/contrib/run_geo.sh \ tom@5855: ${FLYS_DIR}/backend/contrib/run_hydr_morph.sh \ tom@5855: ${FLYS_DIR}/backend/contrib/import_river.sh \ aheinecke@5097: $PKG_DIR tom@5855: cp ${FLYS_DIR}/backend/doc/annotation-types.xml $PKG_DIR/conf aheinecke@5199: if [ -f "$EXTRAS" ]; then aheinecke@5179: cd $PKG_DIR aheinecke@5199: tar -xzf "$EXTRAS" aheinecke@5179: fi aheinecke@5097: tom@5855: cp ${FLYS_DIR}/backend/doc/schema/*.sql $PKG_DIR/schema tom@5520: tom@6814: # create PDF of manual tom@6814: REV=`hg parent | sed -n '1s/[[:alnum:]]*: *\([0-9]*\):.*/\1/;1p'` tom@5855: cd ${FLYS_DIR}/backend/doc/documentation/de/ tom@6814: sed -i "s/documentrevision..rev[0-9]*/documentrevision}{rev$REV/" \ tom@6814: importer-manual.tex tom@6814: pdflatex importer-manual.tex tom@5520: cp importer-manual.pdf $PKG_DIR aheinecke@5097: aheinecke@5097: sed -i 's/shpimporter\/shp/geodaesie\/shp/' $PKG_DIR/run_geo.sh aheinecke@5097: aheinecke@5097: cd $PKG_DIR/.. aheinecke@5417: DATE=$(date +%Y%m%d%H%M) aheinecke@5179: tar -czf flys-importer_${DATE}.tar.gz flys-importer aheinecke@5179: sha1sum flys-importer_${DATE}.tar.gz > flys-importer_${DATE}.tar.gz.sha1 aheinecke@5186: echo Package is at: `readlink -f flys-importer_${DATE}.tar.gz`