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 <public@omeid.me>
This commit is contained in:
O'meid
2015-08-04 15:09:37 +10:00
parent 00d834bdc3
commit 777a09847c

View File

@@ -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