Mercurial > dive4elements > river
comparison contrib/make_flys_release/h2/createDatacage.sh @ 5250:3ba2917e49d3
Remove old artifacts-h2.sql and datacage.sql and expect the
path to the database scheme as a parameter in the scripts
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Tue, 12 Mar 2013 16:50:47 +0100 |
parents | 9d404069f361 |
children | 19472d3877d6 |
comparison
equal
deleted
inserted
replaced
5249:9c4e2192810c | 5250:3ba2917e49d3 |
---|---|
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 mkdir datacagedb | 3 mkdir -p datacagedb |
4 | 4 |
5 DIR=`dirname $0` | 5 DIR=`dirname $0` |
6 DIR=`readlink -f "$DIR"` | 6 DIR=`readlink -f "$DIR"` |
7 | 7 |
8 CLASSPATH= | 8 CLASSPATH= |
9 for l in `find "$DIR" -name \*.jar -print`; do | 9 for l in `find "$DIR" -name \*.jar -print`; do |
10 CLASSPATH=$CLASSPATH:$l | 10 CLASSPATH=$CLASSPATH:$l |
11 done | 11 done |
12 | 12 |
13 export CLASSPATH | 13 export CLASSPATH |
14 if [ $# != 1 ]; then | |
15 echo "Usage: $0 <schema_file>" | |
16 fi | |
14 | 17 |
15 java org.h2.tools.RunScript \ | 18 java org.h2.tools.RunScript \ |
16 -url jdbc:h2:`readlink -f datacagedb`/datacage \ | 19 -url jdbc:h2:`readlink -f datacagedb`/datacage \ |
17 -script $DIR/datacage.sql | 20 -script "$1" |