make build script works on os x if the current dir is not the kubernetes root

This commit is contained in:
Albert Zhang 2014-07-13 18:47:52 +08:00
parent 20226d7c30
commit 23e9c39a96

View File

@ -38,7 +38,7 @@ if [ "${TRAVIS}" != "true" ]; then
fi
if [[ "$OSTYPE" == *darwin* ]]; then
KUBE_REPO_ROOT="${PWD}"
KUBE_REPO_ROOT="${PWD}/$(dirname ${BASH_SOURCE:-$0})/.."
else
KUBE_REPO_REL_ROOT="$(dirname ${BASH_SOURCE:-$0})/.."
KUBE_REPO_ROOT="$(readlink -f ${KUBE_REPO_REL_ROOT})"