-
Notifications
You must be signed in to change notification settings - Fork 790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
install curl before trying to install docker #345
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,6 +89,24 @@ function log_for_sentry() { | |
fi | ||
} | ||
|
||
# Check to see curl is installed. | ||
function verify_curl_installed() { | ||
if command_exists curl; then | ||
return 0 | ||
fi | ||
log_error "CURL NOT INSTALLED" | ||
echo -n | ||
if ! confirm "> Would you like to install Curl? This will run 'apt update && apt upgrade && apt install curl | sh'. [Y/n] "; then | ||
exit 0 | ||
fi | ||
if ! run_step "Installing Curl" install_curl; then | ||
log_error "Curl installation failed." | ||
exit 1 | ||
fi | ||
echo -n "> Verifying Curl installation................ " | ||
command_exists curl | ||
} | ||
|
||
# Check to see if docker is installed. | ||
function verify_docker_installed() { | ||
if command_exists docker; then | ||
|
@@ -118,6 +136,9 @@ function verify_docker_running() { | |
fi | ||
} | ||
|
||
function install_curl() { | ||
apt update && apt upgrade && apt install curl | sh > /dev/null 2>&1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah it is because it will install an outdated version of curl otherwise. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
} | ||
function install_docker() { | ||
curl -sS https://get.docker.com/ | sh > /dev/null 2>&1 | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need to pipe to
sh
?