Fix build for multiple GOPATHs
The build script doesn't work when people have GOPATH like /path/a:/path/b Signed-off-by: Yongkun Anfernee Gui <agui@vmware.com>
This commit is contained in:
@@ -28,6 +28,7 @@ export FOCUS=${FOCUS:-""}
|
||||
export SKIP=${SKIP:-${DEFAULT_SKIP}}
|
||||
REPORT_DIR=${REPORT_DIR:-"/tmp/test-e2e-node"}
|
||||
|
||||
# Check GOPATH
|
||||
if [[ -z "${GOPATH}" ]]; then
|
||||
echo "GOPATH is not set"
|
||||
exit 1
|
||||
@@ -49,6 +50,9 @@ if sudo iptables -L FORWARD | grep "Chain FORWARD (policy DROP)" > /dev/null; th
|
||||
sudo iptables -A FORWARD -w -p ICMP -j ACCEPT
|
||||
fi
|
||||
|
||||
# For multiple GOPATHs, keep the first one only
|
||||
GOPATH=${GOPATH%%:*}
|
||||
|
||||
# Get kubernetes
|
||||
KUBERNETES_REPO="https://github.com/kubernetes/kubernetes"
|
||||
KUBERNETES_PATH="${GOPATH}/src/k8s.io/kubernetes"
|
||||
|
||||
Reference in New Issue
Block a user