ingo@4065: #!/bin/bash
ingo@4065: 
aheinecke@5250: mkdir -p artifactsdb
ingo@4065: 
ingo@4065: DIR=`dirname $0`
ingo@4065: DIR=`readlink -f "$DIR"`
ingo@4065: 
ingo@4065: CLASSPATH=
ingo@4065: for l in `find "$DIR" -name \*.jar -print`; do
ingo@4065:    CLASSPATH=$CLASSPATH:$l
ingo@4065: done
ingo@4065: 
ingo@4065: export CLASSPATH
ingo@4065: 
aheinecke@5250: if [ $# != 1 ]; then
aheinecke@5250:     echo "Usage: $0 <schema_file>"
aheinecke@5250: fi
aheinecke@5250: 
ingo@4065: java org.h2.tools.RunScript \
ingo@4065:     -url jdbc:h2:`readlink -f artifactsdb`/artifacts \
aheinecke@5250:     -script "$1"