aboutsummaryrefslogtreecommitdiff
path: root/build/mysql/mysql
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-09-14 15:19:16 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-09-14 15:19:16 +0200
commit349178ecf6c69be63bd81ce81d310404574cb373 (patch)
treefccbd90c0cae4f43389ec830c9d7924c30c62113 /build/mysql/mysql
parent22dd2e8a904d26c18f6e4c634e14b21a8aaddc7d (diff)
Establish base build system
Diffstat (limited to 'build/mysql/mysql')
-rwxr-xr-xbuild/mysql/mysql56
1 files changed, 56 insertions, 0 deletions
diff --git a/build/mysql/mysql b/build/mysql/mysql
new file mode 100755
index 0000000..c273d56
--- /dev/null
+++ b/build/mysql/mysql
@@ -0,0 +1,56 @@
+#! /usr/bin/env bash
+
+# file : build/mysql/mysql
+# author : Boris Kolpackov <boris@codesynthesis.com>
+# copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
+# license : GNU GPL v2; see accompanying LICENSE file
+
+#
+# MySQL driver wrapper.
+#
+
+while [ $# -gt 0 ]; do
+ case $1 in
+ --driver)
+ driver=$2
+ shift 2
+ ;;
+ --user)
+ opt="$opt --user=$2"
+ shift 2
+ ;;
+ --password)
+ opt="$opt --password=$2"
+ shift 2
+ ;;
+ --database)
+ opt="$opt --database=$2"
+ shift 2
+ ;;
+ --host)
+ opt="$opt --host=$2"
+ shift 2
+ ;;
+ --port)
+ opt="$opt --port=$2"
+ shift 2
+ ;;
+ --socket)
+ opt="$opt --socket=$2"
+ shift 2
+ ;;
+ *)
+ break
+ ;;
+ esac
+done
+
+if [ -z "$driver" ]; then
+ driver=mysql
+fi
+
+if [ -n "$1" ]; then
+ exec $driver $opt <$1
+else
+ exec $driver $opt
+fi