refactoring most of bootstrap into makefile. bootstrap supports branch checkouts, and using existing cloned dokku repos

This commit is contained in:
Jeff Lindsay
2013-07-02 03:12:43 -05:00
parent 19a0ee20e7
commit 2dfe1e1b05
3 changed files with 32 additions and 20 deletions

View File

@@ -1,19 +1,13 @@
DOKKU_REPO=${DOKKU_REPO:-"https://github.com/progrium/dokku.git"}
DOKKU_STACK=${DOKKU_STACK:-"https://s3.amazonaws.com/progrium-dokku/progrium_buildstep.tgz"}
DOCKER_PKG=${DOCKER_PKG:-"https://launchpad.net/~dotcloud/+archive/lxc-docker/+files/lxc-docker_0.4.2-1_amd64.deb"}
set -e
export DEBIAN_FRONTEND=noninteractive
export DOKKU_REPO=${DOKKU_REPO:-"https://github.com/progrium/dokku.git"}
DEBIAN_FRONTEND=noninteractive apt-get install -y linux-image-extra-`uname -r`
apt-get update && apt-get install -y git make curl
apt-get update
apt-get install -y git make curl
wget -qO- "$DOCKER_PKG" > /tmp/lxc-docker_0.4.2-1_amd64.deb
dpkg --force-depends -i /tmp/lxc-docker_0.4.2-1_amd64.deb && apt-get install -f -y
rm /tmp/lxc-docker_0.4.2-1_amd64.deb
cd ~ && git clone ${DOKKU_REPO}
cd dokku && make install
curl "$DOKKU_STACK" | gunzip -cd | docker import - progrium/buildstep
cd ~ && test -d dokku || git clone $DOKKU_REPO
cd dokku && test $DOKKU_BRANCH && git checkout origin/$DOKKU_BRANCH || true
make install-all
echo
echo "Be sure to upload a public key for your user:"