From 777a09847c69aa512c4a6138eb0ff22ddd4d78a4 Mon Sep 17 00:00:00 2001 From: O'meid Date: Tue, 4 Aug 2015 15:09:37 +1000 Subject: [PATCH 1/2] Make bootstrap.sh safe from bad connection This allows to run the bootstrap.sh directly and "safely" without storing it on disk. Signed-off-by: O'meid --- bootstrap.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bootstrap.sh b/bootstrap.sh index 66e3a7d2b69..4b9de797724 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -5,6 +5,15 @@ # If installing a tag higher than 0.3.13, it may install dokku via a package (so long as the package is higher than 0.3.13) # It checks out the dokku source code from Github into ~/dokku and then runs 'make install' from dokku source. +# We wrap this whole script in a function, so that we won't execute +# until the entire script is downloaded. +# That's good because it prevents our output overlapping with curl's. +# It also means that we can't run a partially downloaded script. + + +bootstrap () { + + set -eo pipefail export DEBIAN_FRONTEND=noninteractive export DOKKU_REPO=${DOKKU_REPO:-"https://github.com/progrium/dokku.git"} @@ -68,3 +77,7 @@ elif [[ -n $DOKKU_TAG ]]; then else dokku_install_package fi + +} + +bootstrap From 9835b5da41082c707c8f76e5fb1d7d8d8208d9c7 Mon Sep 17 00:00:00 2001 From: O'meid Date: Tue, 11 Aug 2015 19:38:43 +1000 Subject: [PATCH 2/2] show the Tag and Repo used. --- bootstrap.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bootstrap.sh b/bootstrap.sh index 4b9de797724..5ee2c04618e 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -18,6 +18,7 @@ set -eo pipefail export DEBIAN_FRONTEND=noninteractive export DOKKU_REPO=${DOKKU_REPO:-"https://github.com/progrium/dokku.git"} +echo "Preparing to install $DOKKU_TAG from $DOKKU_REPO..." if ! command -v apt-get &>/dev/null; then echo "This installation script requires apt-get. For manual installation instructions, consult http://progrium.viewdocs.io/dokku/advanced-installation ." exit 1