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
d7a89117
Commit
d7a89117
authored
Apr 13, 2015
by
Eric Paris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use a helper to find built binaries
Instead of doing it all outselves....
parent
55d133ea
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
111 deletions
+18
-111
util.sh
hack/lib/util.sh
+12
-0
run-gendocs.sh
hack/run-gendocs.sh
+3
-54
verify-gendocs.sh
hack/verify-gendocs.sh
+3
-57
No files found.
hack/lib/util.sh
View file @
d7a89117
...
@@ -96,6 +96,18 @@ kube::util::host_platform() {
...
@@ -96,6 +96,18 @@ kube::util::host_platform() {
echo
"
${
host_os
}
/
${
host_arch
}
"
echo
"
${
host_os
}
/
${
host_arch
}
"
}
}
kube::util::find-binary
()
{
local
lookfor
=
"
${
1
}
"
local
host_platform
=
"
$(
kube::util::host_platform
)
"
local
locations
=(
"
${
KUBE_ROOT
}
/_output/dockerized/bin/
${
host_platform
}
/
${
lookfor
}
"
"
${
KUBE_ROOT
}
/_output/local/bin/
${
host_platform
}
/
${
lookfor
}
"
"
${
KUBE_ROOT
}
/platforms/
${
host_platform
}
/
${
lookfor
}
"
)
local
bin
=
$(
(
ls
-t
"
${
locations
[@]
}
"
2>/dev/null
||
true
)
|
head
-1
)
echo
-n
"
${
bin
}
"
}
# Wait for background jobs to finish. Return with
# Wait for background jobs to finish. Return with
# an error status if any of the jobs failed.
# an error status if any of the jobs failed.
kube::util::wait-for-jobs
()
{
kube::util::wait-for-jobs
()
{
...
...
hack/run-gendocs.sh
View file @
d7a89117
...
@@ -30,61 +30,10 @@ get_absolute_dirname() {
...
@@ -30,61 +30,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
# Find binary
# Find binary
locations
=(
gendocs
=
$(
kube::util::find-binary
"gendocs"
)
"
${
KUBE_ROOT
}
/_output/dockerized/bin/
${
host_os
}
/
${
host_arch
}
/gendocs"
genman
=
$(
kube::util::find-binary
"genman"
)
"
${
KUBE_ROOT
}
/_output/local/bin/
${
host_os
}
/
${
host_arch
}
/gendocs"
genbashcomp
=
$(
kube::util::find-binary
"genbashcomp"
)
"
${
KUBE_ROOT
}
/platforms/
${
host_os
}
/
${
host_arch
}
/gendocs"
)
gendocs
=
$(
(
ls
-t
"
${
locations
[@]
}
"
2>/dev/null
||
true
)
|
head
-1
)
locations
=(
"
${
KUBE_ROOT
}
/_output/dockerized/bin/
${
host_os
}
/
${
host_arch
}
/genman"
"
${
KUBE_ROOT
}
/_output/local/bin/
${
host_os
}
/
${
host_arch
}
/genman"
"
${
KUBE_ROOT
}
/platforms/
${
host_os
}
/
${
host_arch
}
/genman"
)
genman
=
$(
(
ls
-t
"
${
locations
[@]
}
"
2>/dev/null
||
true
)
|
head
-1
)
locations
=(
"
${
KUBE_ROOT
}
/_output/dockerized/bin/
${
host_os
}
/
${
host_arch
}
/genbashcomp"
"
${
KUBE_ROOT
}
/_output/local/bin/
${
host_os
}
/
${
host_arch
}
/genbashcomp"
"
${
KUBE_ROOT
}
/platforms/
${
host_os
}
/
${
host_arch
}
/genbashcomp"
)
genbashcomp
=
$(
(
ls
-t
"
${
locations
[@]
}
"
2>/dev/null
||
true
)
|
head
-1
)
if
[[
!
-x
"
$gendocs
"
||
!
-x
"
$genman
"
||
!
-x
"
$genbashcomp
"
]]
;
then
if
[[
!
-x
"
$gendocs
"
||
!
-x
"
$genman
"
||
!
-x
"
$genbashcomp
"
]]
;
then
{
{
...
...
hack/verify-gendocs.sh
View file @
d7a89117
...
@@ -30,63 +30,9 @@ get_absolute_dirname() {
...
@@ -30,63 +30,9 @@ 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
gendocs
=
$(
kube::util::find-binary
"gendocs"
)
case
"
$(
uname
-s
)
"
in
genman
=
$(
kube::util::find-binary
"genman"
)
Darwin
)
genbashcomp
=
$(
kube::util::find-binary
"genbashcomp"
)
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
# Find binary
locations
=(
"
${
KUBE_ROOT
}
/_output/dockerized/bin/
${
host_os
}
/
${
host_arch
}
/gendocs"
"
${
KUBE_ROOT
}
/_output/local/bin/
${
host_os
}
/
${
host_arch
}
/gendocs"
"
${
KUBE_ROOT
}
/platforms/
${
host_os
}
/
${
host_arch
}
/gendocs"
)
gendocs
=
$(
(
ls
-t
"
${
locations
[@]
}
"
2>/dev/null
||
true
)
|
head
-1
)
locations
=(
"
${
KUBE_ROOT
}
/_output/dockerized/bin/
${
host_os
}
/
${
host_arch
}
/genman"
"
${
KUBE_ROOT
}
/_output/local/bin/
${
host_os
}
/
${
host_arch
}
/genman"
"
${
KUBE_ROOT
}
/platforms/
${
host_os
}
/
${
host_arch
}
/genman"
)
genman
=
$(
(
ls
-t
"
${
locations
[@]
}
"
2>/dev/null
||
true
)
|
head
-1
)
locations
=(
"
${
KUBE_ROOT
}
/_output/dockerized/bin/
${
host_os
}
/
${
host_arch
}
/genbashcomp"
"
${
KUBE_ROOT
}
/_output/local/bin/
${
host_os
}
/
${
host_arch
}
/genbashcomp"
"
${
KUBE_ROOT
}
/platforms/
${
host_os
}
/
${
host_arch
}
/genbashcomp"
)
genbashcomp
=
$(
(
ls
-t
"
${
locations
[@]
}
"
2>/dev/null
||
true
)
|
head
-1
)
if
[[
!
-x
"
$gendocs
"
||
!
-x
"
$genman
"
||
!
-x
"
$genbashcomp
"
]]
;
then
if
[[
!
-x
"
$gendocs
"
||
!
-x
"
$genman
"
||
!
-x
"
$genbashcomp
"
]]
;
then
{
{
...
...
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