From 0661c7329d5b1fb7630f7ba37c722c06882ea811 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 3 Aug 2014 18:39:36 +0200 Subject: [PATCH] MDEV-6352 [PATCH] mysql_config prints usage to stdout and exit with 0 if run with unknow option --- scripts/mysql_config.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh index beff6e5eb5f..4bf95cccbe6 100644 --- a/scripts/mysql_config.sh +++ b/scripts/mysql_config.sh @@ -176,10 +176,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 @@ -198,10 +198,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