#!/bin/sh [ -z "$3" ] && { echo "Syntax: $0 test-database admin-user test-user [misc]" >&2 echo echo "Where misc is:" echo " --no-create don't create the DB" echo " --run-name name run tests matching '*name*'" echo exit 1 } test_db="$1" admin_user="$2" test_user="$3" create_db=1 run_name="" while ! [ -z "$4" ]; do if [ "x$4" = "x--no-create" ]; then create_db=0 elif [ "x$4" = "x--run-name" ]; then shift run_name="$4" fi shift done scriptdir="`dirname $0`" tempdir="`mktemp -d`" cp -Rap $scriptdir/../../legacyworlds-server-data/db-structure/* $tempdir/ cat > $tempdir/db-config.txt <