Commit 584d43ab authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

print a usage message for any unknown parameters (which are probably typos). closes #737

git-svn-id: file:///svn/mysql/tokudb-engine/src@3588 c7de825b-a66e-492c-adef-691d508d4ae1
parent 066a02e9
...@@ -3,25 +3,33 @@ ...@@ -3,25 +3,33 @@
# create the Makefile from the Makefile.tokutek template and some # create the Makefile from the Makefile.tokutek template and some
# command line parameters # command line parameters
tokudb=/usr/local/tokudb tokudb=/usr/local/tokudb
tokudb_version=`basename $tokudb` tokudb_version=`basename $tokudb`
mysql=/usr/local/mysql mysql=/usr/local/mysql
libdir=/usr/local/mysql/lib libdir=/usr/local/mysql/lib
function usage() {
echo "configure.tokutek"
echo "--with-tokudb=$tokudb"
echo "--tokudb_version=$tokudb_version"
echo "--with-mysql=$mysql"
echo "--libdir=$libdir"
}
while [ $# -gt 0 ] ; do while [ $# -gt 0 ] ; do
arg=$1; shift arg=$1; shift
if [[ $arg =~ "--with-tokudb=(.*)" ]] ; then if [[ $arg =~ "--with-tokudb=(.*)" ]] ; then
tokudb=${BASH_REMATCH[1]} tokudb=${BASH_REMATCH[1]}
tokudb_version=`basename $tokudb` tokudb_version=`basename $tokudb`
fi elif [[ $arg =~ "--with-mysql=(.*)" ]] ; then
if [[ $arg =~ "--with-mysql=(.*)" ]] ; then
mysql=${BASH_REMATCH[1]} mysql=${BASH_REMATCH[1]}
fi elif [[ $arg =~ "--libdir=(.*)" ]] ; then
if [[ $arg =~ "--libdir=(.*)" ]] ; then
libdir=${BASH_REMATCH[1]} libdir=${BASH_REMATCH[1]}
fi elif [[ $arg =~ "--tokudb_version=(.*)" ]] ; then
if [[ $arg =~ "--tokudb_version=(.*)" ]] ; then
tokudb_version=${BASH_REMATCH[1]} tokudb_version=${BASH_REMATCH[1]}
else
usage; exit 1
fi fi
done done
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment