Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
7bfe57b3
Commit
7bfe57b3
authored
Apr 14, 2015
by
Dawn Chen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6783 from eparis/use-hack-lib-find-binaries
Use a helper to find built binaries
parents
8420abee
6d4ab258
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
86 deletions
+4
-86
kubectl.sh
cluster/kubectl.sh
+2
-42
ginkgo-e2e.sh
hack/ginkgo-e2e.sh
+2
-44
No files found.
cluster/kubectl.sh
View file @
7bfe57b3
...
@@ -20,6 +20,7 @@ set -o pipefail
...
@@ -20,6 +20,7 @@ set -o pipefail
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
source
"
${
KUBE_ROOT
}
/cluster/kube-env.sh"
source
"
${
KUBE_ROOT
}
/cluster/kube-env.sh"
source
"
${
KUBE_ROOT
}
/hack/lib/util.sh"
UTILS
=
${
KUBE_ROOT
}
/cluster/
${
KUBERNETES_PROVIDER
}
/util.sh
UTILS
=
${
KUBE_ROOT
}
/cluster/
${
KUBERNETES_PROVIDER
}
/util.sh
if
[
-f
${
UTILS
}
]
;
then
if
[
-f
${
UTILS
}
]
;
then
source
"
${
UTILS
}
"
source
"
${
UTILS
}
"
...
@@ -31,51 +32,10 @@ get_absolute_dirname() {
...
@@ -31,51 +32,10 @@ get_absolute_dirname() {
echo
"
$(
cd
"
$(
dirname
"
$1
"
)
"
&&
pwd
)
"
echo
"
$(
cd
"
$(
dirname
"
$1
"
)
"
&&
pwd
)
"
}
}
# Detect the OS name/arch so that we can find our binary
case
"
$(
uname
-s
)
"
in
Darwin
)
host_os
=
darwin
;;
Linux
)
host_os
=
linux
;;
*
)
echo
"Unsupported host OS. Must be Linux or Mac OS X."
>
&2
exit
1
;;
esac
case
"
$(
uname
-m
)
"
in
x86_64
*
)
host_arch
=
amd64
;;
i?86_64
*
)
host_arch
=
amd64
;;
amd64
*
)
host_arch
=
amd64
;;
arm
*
)
host_arch
=
arm
;;
i?86
*
)
host_arch
=
x86
;;
*
)
echo
"Unsupported host arch. Must be x86_64, 386 or arm."
>
&2
exit
1
;;
esac
# If KUBECTL_PATH isn't set, gather up the list of likely places and use ls
# If KUBECTL_PATH isn't set, gather up the list of likely places and use ls
# to find the latest one.
# to find the latest one.
if
[[
-z
"
${
KUBECTL_PATH
:-}
"
]]
;
then
if
[[
-z
"
${
KUBECTL_PATH
:-}
"
]]
;
then
locations
=(
kubectl
=
$(
kube::util::find-binary
"kubectl"
)
"
${
KUBE_ROOT
}
/_output/dockerized/bin/
${
host_os
}
/
${
host_arch
}
/kubectl"
"
${
KUBE_ROOT
}
/_output/local/bin/
${
host_os
}
/
${
host_arch
}
/kubectl"
"
${
KUBE_ROOT
}
/platforms/
${
host_os
}
/
${
host_arch
}
/kubectl"
)
kubectl
=
$(
(
ls
-t
"
${
locations
[@]
}
"
2>/dev/null
||
true
)
|
head
-1
)
if
[[
!
-x
"
$kubectl
"
]]
;
then
if
[[
!
-x
"
$kubectl
"
]]
;
then
{
{
...
...
hack/ginkgo-e2e.sh
View file @
7bfe57b3
...
@@ -21,50 +21,8 @@ set -o pipefail
...
@@ -21,50 +21,8 @@ set -o pipefail
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
# --- Find local test binaries.
# --- Find local test binaries.
source
"
${
KUBE_ROOT
}
/hack/lib/util.sh"
# Detect the OS name/arch so that we can find our binary
e2e
=
$(
kube::util::find-binary
"e2e"
)
case
"
$(
uname
-s
)
"
in
Darwin
)
host_os
=
darwin
;;
Linux
)
host_os
=
linux
;;
*
)
echo
"Unsupported host OS. Must be Linux or Mac OS X."
>
&2
exit
1
;;
esac
case
"
$(
uname
-m
)
"
in
x86_64
*
)
host_arch
=
amd64
;;
i?86_64
*
)
host_arch
=
amd64
;;
amd64
*
)
host_arch
=
amd64
;;
arm
*
)
host_arch
=
arm
;;
i?86
*
)
host_arch
=
x86
;;
*
)
echo
"Unsupported host arch. Must be x86_64, 386 or arm."
>
&2
exit
1
;;
esac
# Gather up the list of likely places and use ls to find the latest one.
locations
=(
"
${
KUBE_ROOT
}
/_output/dockerized/bin/
${
host_os
}
/
${
host_arch
}
/e2e"
"
${
KUBE_ROOT
}
/_output/local/bin/
${
host_os
}
/
${
host_arch
}
/e2e"
"
${
KUBE_ROOT
}
/platforms/
${
host_os
}
/
${
host_arch
}
/e2e"
)
e2e
=
$(
(
ls
-t
"
${
locations
[@]
}
"
2>/dev/null
||
true
)
|
head
-1
)
# --- Setup some env vars.
# --- Setup some env vars.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment