mirror of
https://github.com/minio/minio.git
synced 2025-05-21 17:43:48 -04:00
Fix dependency checking on osx
This commit is contained in:
parent
7133513600
commit
c503bf412f
@ -32,6 +32,27 @@ _init() {
|
|||||||
MISSING=""
|
MISSING=""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
readlink() {
|
||||||
|
TARGET_FILE=$1
|
||||||
|
|
||||||
|
cd `dirname $TARGET_FILE`
|
||||||
|
TARGET_FILE=`basename $TARGET_FILE`
|
||||||
|
|
||||||
|
# Iterate down a (possible) chain of symlinks
|
||||||
|
while [ -L "$TARGET_FILE" ]
|
||||||
|
do
|
||||||
|
TARGET_FILE=$(env readlink $TARGET_FILE)
|
||||||
|
cd `dirname $TARGET_FILE`
|
||||||
|
TARGET_FILE=`basename $TARGET_FILE`
|
||||||
|
done
|
||||||
|
|
||||||
|
# Compute the canonicalized name by finding the physical path
|
||||||
|
# for the directory we're in and appending the target file.
|
||||||
|
PHYS_DIR=`pwd -P`
|
||||||
|
RESULT=$PHYS_DIR/$TARGET_FILE
|
||||||
|
echo $RESULT
|
||||||
|
}
|
||||||
|
|
||||||
###
|
###
|
||||||
#
|
#
|
||||||
# Takes two arguments
|
# Takes two arguments
|
||||||
@ -106,7 +127,7 @@ check_golang_env() {
|
|||||||
|
|
||||||
local new_go_binary_path=${go_binary_path}
|
local new_go_binary_path=${go_binary_path}
|
||||||
if [ -h "${go_binary_path}" ]; then
|
if [ -h "${go_binary_path}" ]; then
|
||||||
new_go_binary_path=$(/bin/readlink -f ${go_binary_path})
|
new_go_binary_path=$(readlink ${go_binary_path})
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ !"$(dirname ${new_go_binary_path})" =~ *"${GOROOT%%*(/)}"* ]] ; then
|
if [[ !"$(dirname ${new_go_binary_path})" =~ *"${GOROOT%%*(/)}"* ]] ; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user