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 committed 2015-08-04 17:13:42 +10:00
1 parent 00d834bdc3
commit 777a09847c
1 file changed
+13
+13
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) # 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. # 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 set -eo pipefail
export DEBIAN_FRONTEND=noninteractive export DEBIAN_FRONTEND=noninteractive
export DOKKU_REPO=${DOKKU_REPO:-"https://github.com/progrium/dokku.git"} export DOKKU_REPO=${DOKKU_REPO:-"https://github.com/progrium/dokku.git"}
@@ -68,3 +77,7 @@ elif [[ -n $DOKKU_TAG ]]; then
else else
dokku_install_package dokku_install_package
fi fi
}
bootstrap