Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
55ab4b86
Unverified
Commit
55ab4b86
authored
Dec 28, 2017
by
Matthew Fisher
Committed by
GitHub
Dec 28, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2986 from goostleek/bug/installation-script-fix
Installation shell script fix
parents
78d6b930
9a42d718
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
get
scripts/get
+12
-4
No files found.
scripts/get
View file @
55ab4b86
...
...
@@ -111,8 +111,9 @@ downloadFile() {
HELM_DIST
=
"helm-
$TAG
-
$OS
-
$ARCH
.tar.gz"
DOWNLOAD_URL
=
"https://kubernetes-helm.storage.googleapis.com/
$HELM_DIST
"
CHECKSUM_URL
=
"
$DOWNLOAD_URL
.sha256"
HELM_TMP_FILE
=
"/tmp/
$HELM_DIST
"
HELM_SUM_FILE
=
"/tmp/
$HELM_DIST
.sha256"
HELM_TMP_ROOT
=
"
$(
mktemp
-dt
helm-installer-XXXXXX
)
"
HELM_TMP_FILE
=
"
$HELM_TMP_ROOT
/
$HELM_DIST
"
HELM_SUM_FILE
=
"
$HELM_TMP_ROOT
/
$HELM_DIST
.sha256"
echo
"Downloading
$DOWNLOAD_URL
"
if
type
"curl"
>
/dev/null
;
then
curl
-SsL
"
$CHECKSUM_URL
"
-o
"
$HELM_SUM_FILE
"
...
...
@@ -129,7 +130,7 @@ downloadFile() {
# installFile verifies the SHA256 for the file, then unpacks and
# installs it.
installFile
()
{
HELM_TMP
=
"
/tmp
/
$PROJECT_NAME
"
HELM_TMP
=
"
$HELM_TMP_ROOT
/
$PROJECT_NAME
"
local sum
=
$(
openssl sha1
-sha256
${
HELM_TMP_FILE
}
|
awk
'{print $2}'
)
local
expected_sum
=
$(
cat
${
HELM_SUM_FILE
})
if
[
"
$sum
"
!=
"
$expected_sum
"
]
;
then
...
...
@@ -156,6 +157,7 @@ fail_trap() {
fi
echo
-e
"
\t
For support, go to https://github.com/kubernetes/helm."
fi
cleanup
exit
$result
}
...
...
@@ -180,6 +182,11 @@ help () {
echo
-e
"
\t
e.g. --version v2.4.0 or -v latest"
}
# cleanup temporary files to avoid https://github.com/kubernetes/helm/issues/2977
cleanup
()
{
rm
-rf
"
$HELM_TMP_ROOT
"
}
# Execution
#Stop execution on any error
...
...
@@ -200,7 +207,7 @@ while [[ $# -gt 0 ]]; do
exit
0
fi
;;
'--help'
|
-h
)
'--help'
|
-h
)
help
exit
0
;;
...
...
@@ -220,3 +227,4 @@ if ! checkHelmInstalledVersion; then
installFile
fi
testVersion
cleanup
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