1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-13946 Server RPMs have dependency on "which"

cleanup. use "command -v" instead of "which"
simplify some checks.
This commit is contained in:
Sergei Golubchik
2017-10-10 22:47:18 +02:00
parent 2232784f00
commit 355ee6877b
8 changed files with 39 additions and 121 deletions

View File

@ -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
}