diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-09-14 15:19:16 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-09-14 15:19:16 +0200 |
commit | 349178ecf6c69be63bd81ce81d310404574cb373 (patch) | |
tree | fccbd90c0cae4f43389ec830c9d7924c30c62113 /build/mysql/configure | |
parent | 22dd2e8a904d26c18f6e4c634e14b21a8aaddc7d (diff) |
Establish base build system
Diffstat (limited to 'build/mysql/configure')
-rwxr-xr-x | build/mysql/configure | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/build/mysql/configure b/build/mysql/configure new file mode 100755 index 0000000..a454fc0 --- /dev/null +++ b/build/mysql/configure @@ -0,0 +1,77 @@ +#! /usr/bin/env bash + +# file : build/mysql/configure +# author : Boris Kolpackov <boris@codesynthesis.com> +# copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC +# license : GNU GPL v2; see accompanying LICENSE file + +# +# dcf_root - dynamic configuration root +# + +$echo +$echo "Please enter the MySQL client program path." +$echo + +driver=`read_path --command mysql` + +$echo +$echo "Please enter the MySQL database user." +$echo + +user=`read_value "odb_test"` + +$echo +$echo "Please enter the MySQL database password. Enter NULL for" +$echo "unspecified password as opposed to the empty password." +$echo + +passwd=`read_value "NULL"` + +$echo +$echo "Please enter the MySQL database name. Note that it WILL BE" +$echo "MODIFIED by the tests." +$echo + +db=`read_value "odb_test"` + +$echo +$echo "Please enter the MySQL database host." +$echo + +host=`read_value ""` + +$echo +$echo "Please enter the MySQL database port." +$echo + +port=`read_value "0"` + +$echo +$echo "Please enter the MySQL database socket name. Enter NULL for" +$echo "unspecified name as opposed to the empty name." +$echo + +socket=`read_value "NULL"` + +opt=$dcf_root/db.options +drv=$dcf_root/db-driver + +echo "--user '$user'" >$opt + +if [ "$passwd" != "NULL" ]; then +echo "--password '$passwd'" >>$opt +fi + +echo "--database '$db'" >>$opt +echo "--host '$host'" >>$opt +echo "--port $port" >>$opt + +if [ "$socket" != "NULL" ]; then +echo "--socket '$socket'" >>$opt +fi + +echo "#!/bin/sh" >$drv +echo "opt=\`cat $opt\`" >>$drv +echo "eval $scf_root/mysql/mysql --driver $driver \$opt \$*" >>$drv +chmod 755 $drv |