diff options
Diffstat (limited to 'scripts/mysql_config.sh')
-rw-r--r-- | scripts/mysql_config.sh | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh index de874ef0424..52f6d563fe5 100644 --- a/scripts/mysql_config.sh +++ b/scripts/mysql_config.sh @@ -76,7 +76,8 @@ get_full_path () me=`get_full_path $0` -basedir=`echo $me | sed -e 's;/bin/mysql_config;;'` +# Script might have been renamed but assume mysql_<something>config<something> +basedir=`echo $me | sed -e 's;/bin/mysql_.*config.*;;'` ldata='@localstatedir@' execdir='@libexecdir@' @@ -85,11 +86,11 @@ bindir='@bindir@' # If installed, search for the compiled in directory first (might be "lib64") pkglibdir='@pkglibdir@' pkglibdir_rel=`echo $pkglibdir | sed -e "s;^$basedir/;;"` -fix_path pkglibdir $pkglibdir_rel lib64/mysql lib64 lib/mysql lib +fix_path pkglibdir $pkglibdir_rel @libsubdir@/mysql @libsubdir@ plugindir='@pkgplugindir@' plugindir_rel=`echo $plugindir | sed -e "s;^$basedir/;;"` -fix_path plugindir $plugindir_rel lib/mysql/plugin lib/plugin +fix_path plugindir $plugindir_rel @libsubdir@/mysql/plugin @libsubdir@/plugin pkgincludedir='@pkgincludedir@' fix_path pkgincludedir include/mysql @@ -131,10 +132,10 @@ Options: pkglibdir [$pkglibdir] plugindir [$plugindir] EOF - exit 0 + exit $1 } -if test $# -le 0; then usage; fi +if test $# -le 0; then usage 0 ; fi while test $# -gt 0; do case $1 in @@ -153,10 +154,10 @@ while test $# -gt 0; do pkgincludedir) echo "$pkgincludedir" ;; pkglibdir) echo "$pkglibdir" ;; plugindir) echo "$plugindir" ;; - *) usage ;; + *) usage 1 >&2 ;; esac ;; - *) usage ;; + *) usage 1 >&2 ;; esac shift |