Commit 663b80b6 authored by Kouhei Ueno's avatar Kouhei Ueno

make hack/config-go.sh sourceable from zsh

parent 89655584
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
# This script sets up a go workspace locally and builds all go components. # This script sets up a go workspace locally and builds all go components.
# You can 'source' this file if you want to set up GOPATH in your local shell. # You can 'source' this file if you want to set up GOPATH in your local shell.
if [ "$(which go)" == "" ]; then if [[ "$(which go)" == "" ]]; then
echo "Can't find 'go' in PATH, please fix and retry." echo "Can't find 'go' in PATH, please fix and retry."
echo "See http://golang.org/doc/install for installation instructions." echo "See http://golang.org/doc/install for installation instructions."
exit 1 exit 1
...@@ -29,7 +29,7 @@ fi ...@@ -29,7 +29,7 @@ fi
if [ "${TRAVIS}" != "true" ]; then if [ "${TRAVIS}" != "true" ]; then
GO_VERSION=($(go version)) GO_VERSION=($(go version))
if [ ${GO_VERSION[2]} \< "go1.2" ]; then if [[ ${GO_VERSION[2]} < "go1.2" ]]; then
echo "Detected go version: ${GO_VERSION}." echo "Detected go version: ${GO_VERSION}."
echo "Kubernetes requires go version 1.2 or greater." echo "Kubernetes requires go version 1.2 or greater."
echo "Please install Go version 1.2 or later" echo "Please install Go version 1.2 or later"
...@@ -37,10 +37,9 @@ if [ "${TRAVIS}" != "true" ]; then ...@@ -37,10 +37,9 @@ if [ "${TRAVIS}" != "true" ]; then
fi fi
fi fi
pushd $(dirname "${BASH_SOURCE}")/.. >/dev/null KUBE_REPO_REL_ROOT="$(dirname ${BASH_SOURCE:-$0})/.."
KUBE_REPO_ROOT="${PWD}" KUBE_REPO_ROOT="$(readlink -f ${KUBE_REPO_REL_ROOT})"
KUBE_TARGET="${KUBE_REPO_ROOT}/output/go" KUBE_TARGET="${KUBE_REPO_ROOT}/output/go"
popd >/dev/null
mkdir -p "${KUBE_TARGET}" mkdir -p "${KUBE_TARGET}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment