Commit 9c5be7d1 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-14580: mysql_install_db elements based on dirname of mysql_install_db

Avoid introducing new dependencies or new syntax.
That is, don't use $(...) and don't assume dirname is present.

And remove unsighty /foo/bar/../xyz from the path. Use dirname
instead of ../
parent 50e59338
...@@ -36,6 +36,9 @@ in_rpm=0 ...@@ -36,6 +36,9 @@ in_rpm=0
ip_only=0 ip_only=0
cross_bootstrap=0 cross_bootstrap=0
dirname0=`dirname $0 2>/dev/null`
dirname0=`dirname $dirname0 2>/dev/null`
usage() usage()
{ {
cat <<EOF cat <<EOF
...@@ -253,9 +256,9 @@ then ...@@ -253,9 +256,9 @@ then
cannot_find_file my_print_defaults $basedir/bin $basedir/extra cannot_find_file my_print_defaults $basedir/bin $basedir/extra
exit 1 exit 1
fi fi
elif test -x "$(dirname $0)/../@bindir@/my_print_defaults" elif test -n "$dirname0" -a -x "$dirname0/@bindir@/my_print_defaults"
then then
print_defaults="$(dirname $0)/../@bindir@/my_print_defaults" print_defaults="$dirname0/@bindir@/my_print_defaults"
else else
print_defaults="@bindir@/my_print_defaults" print_defaults="@bindir@/my_print_defaults"
fi fi
...@@ -308,9 +311,9 @@ then ...@@ -308,9 +311,9 @@ then
exit 1 exit 1
fi fi
# relative from where the script was run for a relocatable install # relative from where the script was run for a relocatable install
elif test -x "$(dirname $0)/../@INSTALL_SBINDIR@/mysqld" elif test -n "$dirname0" -a -x "$dirname0/@INSTALL_SBINDIR@/mysqld"
then then
basedir="$(dirname $0)/../" basedir="$dirname0"
bindir="$basedir/@INSTALL_SBINDIR@" bindir="$basedir/@INSTALL_SBINDIR@"
resolveip="$bindir/resolveip" resolveip="$bindir/resolveip"
mysqld="$basedir/@INSTALL_SBINDIR@/mysqld" mysqld="$basedir/@INSTALL_SBINDIR@/mysqld"
......
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