summaryrefslogtreecommitdiff
path: root/scripts/mysql_config.sh
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-10-10 22:47:18 +0200
committerSergei Golubchik <serg@mariadb.org>2018-02-12 12:46:34 +0100
commit355ee6877beccf27bcd07d845c985fc1a2845aca (patch)
tree121d859feb21130dbe22ac8e4ec976d6999baff4 /scripts/mysql_config.sh
parent2232784f0094ae7e81f5033fe8f3499e15224fed (diff)
downloadmariadb-git-355ee6877beccf27bcd07d845c985fc1a2845aca.tar.gz
MDEV-13946 Server RPMs have dependency on "which"
cleanup. use "command -v" instead of "which" simplify some checks.
Diffstat (limited to 'scripts/mysql_config.sh')
-rw-r--r--scripts/mysql_config.sh21
1 files changed, 1 insertions, 20 deletions
diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh
index cc6db192de2..9381120a097 100644
--- a/scripts/mysql_config.sh
+++ b/scripts/mysql_config.sh
@@ -17,25 +17,6 @@
# This script reports various configuration settings that may be needed
# when using the MariaDB client library.
-which ()
-{
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
- for file
- do
- for dir in $PATH
- do
- if test -f $dir/$file
- then
- echo "$dir/$file"
- continue 2
- fi
- done
- echo "which: no $file in ($PATH)"
- exit 1
- done
- IFS="$save_ifs"
-}
-
#
# If we can find the given directory relatively to where mysql_config is
# we should use this instead of the incompiled one.
@@ -70,7 +51,7 @@ get_full_path ()
case $file in
/*) echo "$file";;
*/*) tmp=`pwd`/$file; echo $tmp | sed -e 's;/\./;/;' ;;
- *) which $file ;;
+ *) command -v $file ;;
esac
}