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
dfb296ad
Commit
dfb296ad
authored
Jun 29, 2017
by
Taylor Thomas
Committed by
GitHub
Jun 29, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2626 from twolfy/master
[scripts/get] makes sudo an optional dependency
parents
24238bbe
8eace382
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
get
scripts/get
+13
-2
No files found.
scripts/get
View file @
dfb296ad
...
...
@@ -46,6 +46,17 @@ initOS() {
esac
}
# runs the given command as root (detects if we are root already)
runAsRoot
()
{
local
CMD
=
"
$*
"
if
[
$EUID
-ne
0
]
;
then
CMD
=
"sudo
$CMD
"
fi
$CMD
}
# verifySupported checks that the os/arch combination is supported for
# binary builds.
verifySupported
()
{
...
...
@@ -129,8 +140,8 @@ installFile() {
mkdir
-p
"
$HELM_TMP
"
tar
xf
"
$HELM_TMP_FILE
"
-C
"
$HELM_TMP
"
HELM_TMP_BIN
=
"
$HELM_TMP
/
$OS
-
$ARCH
/
$PROJECT_NAME
"
echo
"Preparing to install into
${
HELM_INSTALL_DIR
}
(sudo)
"
sudo
cp
"
$HELM_TMP_BIN
"
"
$HELM_INSTALL_DIR
"
echo
"Preparing to install into
${
HELM_INSTALL_DIR
}
"
runAsRoot
cp
"
$HELM_TMP_BIN
"
"
$HELM_INSTALL_DIR
"
}
# fail_trap is executed if an error occurs.
...
...
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