summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorunknown <df@pippilotta.erinye.com>2007-11-28 17:32:28 +0100
committerunknown <df@pippilotta.erinye.com>2007-11-28 17:32:28 +0100
commit648d3cedbc09eb027d9cdbd9911300e206bf8bae (patch)
tree83f92de27e0e78c3328eebdcc5b6c6dbcc1131a0 /scripts
parent8f60ebfbcb501f9a9f8cbb4883a010313a11d54e (diff)
downloadmariadb-git-648d3cedbc09eb027d9cdbd9911300e206bf8bae.tar.gz
fix make distcheck in a different way
scripts/mysql_install_db.sh: apply different patch for make distcheck failure
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysql_install_db.sh49
1 files changed, 29 insertions, 20 deletions
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index 5fbbebed195..b1d5ad7a0d0 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -19,6 +19,7 @@
# All unrecognized arguments to this script are passed to mysqld.
basedir=""
+builddir=""
ldata="@localstatedir@"
srcdir=""
@@ -37,6 +38,9 @@ usage()
cat <<EOF
Usage: $0 [OPTIONS]
--basedir=path The path to the MySQL installation directory.
+ --builddir=path If using --srcdir with out-of-directory builds, you
+ will need to set this to the location of the build
+ directory where built files reside.
--datadir=path The path to the MySQL data directory.
--force Causes mysql_install_db to run even if DNS does not
work. In that case, grant table entries that normally
@@ -95,6 +99,7 @@ parse_arguments()
case "$arg" in
--force) force=1 ;;
--basedir=*) basedir=`parse_arg "$arg"` ;;
+ --builddir=*) builddir=`parse_arg "$arg"` ;;
--srcdir=*) srcdir=`parse_arg "$arg"` ;;
--ldata=*|--datadir=*) ldata=`parse_arg "$arg"` ;;
--user=*)
@@ -189,12 +194,21 @@ parse_arguments PICK-ARGS-FROM-ARGV "$@"
#
# or default to compiled-in locations.
#
-if test -n "$basedir"
+if test -n "$srcdir" && test -n "$basedir"
then
- print_defaults=`find_in_basedir my_print_defaults bin extra`
-elif test -n "$srcdir"
+ echo "ERROR: Specify either --basedir or --srcdir, not both."
+ exit 1
+fi
+if test -n "$srcdir"
then
- print_defaults="$srcdir/extra/my_print_defaults"
+ if test -z "$builddir"
+ then
+ builddir="$srcdir"
+ fi
+ print_defaults="$builddir/extra/my_print_defaults"
+elif test -n "$basedir"
+then
+ print_defaults=`find_in_basedir my_print_defaults bin extra`
else
print_defaults="@bindir@/my_print_defaults"
fi
@@ -211,19 +225,22 @@ parse_arguments `$print_defaults $defaults mysqld mysql_install_db`
parse_arguments PICK-ARGS-FROM-ARGV "$@"
# Configure paths to support files
-if test -n "$basedir"
+if test -n "$srcdir"
+then
+ basedir="$builddir"
+ bindir="$basedir/client"
+ extra_bindir="$basedir/extra"
+ mysqld="$basedir/sql/mysqld"
+ mysqld_opt="--language=$srcdir/sql/share/english"
+ pkgdatadir="$srcdir/scripts"
+ scriptdir="$srcdir/scripts"
+elif test -n "$basedir"
then
bindir="$basedir/bin"
extra_bindir="$bindir"
- mysqld=`find_in_basedir mysqld libexec sbin bin sql`
+ mysqld=`find_in_basedir mysqld libexec sbin bin`
pkgdatadir=`find_in_basedir --dir fill_help_tables.sql share share/mysql`
scriptdir="$basedir/scripts"
-elif test -n "$srcdir"
-then
- basedir="$srcdir"
- bindir="$srcdir/client"
- extra_bindir="$srcdir/extra"
- mysqld="$srcdir/sql/mysqld"
else
basedir="@prefix@"
bindir="@bindir@"
@@ -233,13 +250,6 @@ else
scriptdir="@scriptdir@"
fi
-if test -n "$srcdir"
-then
- mysqld_opt="--language=$srcdir/sql/share/english"
- pkgdatadir="$srcdir/scripts"
- scriptdir="$srcdir/scripts"
-fi
-
# Set up paths to SQL scripts required for bootstrap
fill_help_tables="$pkgdatadir/fill_help_tables.sql"
create_system_tables="$pkgdatadir/mysql_system_tables.sql"
@@ -318,7 +328,6 @@ mysqld_bootstrap="${MYSQLD_BOOTSTRAP-$mysqld}"
mysqld_install_cmd_line="$mysqld_bootstrap $defaults $mysqld_opt --bootstrap \
--basedir=$basedir --datadir=$ldata --log-warnings=0 --loose-skip-innodb \
--loose-skip-ndbcluster $args --max_allowed_packet=8M \
- --default-storage-engine=myisam \
--net_buffer_length=16K"
# Create the system and help tables by passing them to "mysqld --bootstrap"