Merge pull request #275 from progrium/shebang-pipefail

normalizing shebang and bash options + long-term fix for bootstrap instructions
This commit is contained in:
rhy-jot
2013-10-30 15:41:39 -07:00
15 changed files with 32 additions and 32 deletions

View File

@@ -1,6 +1,5 @@
#!/usr/bin/env sh
set -e
#!/usr/bin/env bash
set -eo pipefail
export DEBIAN_FRONTEND=noninteractive
export DOKKU_REPO=${DOKKU_REPO:-"https://github.com/progrium/dokku.git"}
@@ -18,5 +17,5 @@ cd dokku && test $DOKKU_BRANCH && git checkout origin/$DOKKU_BRANCH || true
make install
echo
echo "Be sure to upload a public key for your user:"
echo " cat ~/.ssh/id_rsa.pub | ssh root@$HOSTNAME \"gitreceive upload-key progrium\""
echo "Almost done! For next steps on configuration:"
echo " https://github.com/progrium/dokku#configuring"

7
dokku
View File

@@ -1,6 +1,5 @@
#!/usr/bin/env bash
set -e
set -o pipefail
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
export PLUGIN_PATH=${PLUGIN_PATH:="/var/lib/dokku/plugins"}
export DOKKU_ROOT=${DOKKU_ROOT:="/home/dokku"}
@@ -9,16 +8,12 @@ case "$1" in
APP="$2"; IMAGE="app/$APP"
echo "-----> Building $APP ..."
cat | dokku build $APP $IMAGE
echo "-----> Build complete!"
echo "-----> Releasing $APP ..."
dokku release $APP $IMAGE
echo "-----> Release complete!"
echo "-----> Deploying $APP ..."
dokku deploy $APP $IMAGE
echo "-----> Deploy complete!"
echo "-----> Cleaning up ..."
dokku cleanup
echo "-----> Cleanup complete!"
echo "=====> Application deployed:"
echo " $(dokku url $APP)"
echo

View File

@@ -1,5 +1,6 @@
#!/bin/bash
set -e; case "$1" in
#!/usr/bin/env bash
set -eo pipefail
case "$1" in
delete)
if [[ -z $2 ]]; then
echo "Please specify an app to delete"

View File

@@ -1,4 +1,5 @@
#!/bin/bash
#!/usr/bin/env bash
set -eo pipefail
sed -i 's/docker -d$/docker -d -r=true/' /etc/init/docker.conf

View File

@@ -1,3 +1,3 @@
#!/bin/bash
set -e
#!/usr/bin/env bash
set -eo pipefail
[[ -n $1 ]] && rm -r "$DOKKU_ROOT/$1" > /dev/null

View File

@@ -1,5 +1,5 @@
#!/bin/bash
set -e;
#!/usr/bin/env bash
set -eo pipefail
# Check if name is specified
if [[ $1 == config ]] || [[ $1 == config:* ]]; then

View File

@@ -1,5 +1,5 @@
#!/bin/bash
set -e;
#!/usr/bin/env bash
set -eo pipefail
case "$1" in
git-hook)

View File

@@ -1,2 +1,3 @@
#!/bin/bash
#!/usr/bin/env bash
set -eo pipefail
cat

View File

@@ -1,4 +1,5 @@
#!/bin/bash
#!/usr/bin/env bash
set -eo pipefail
# latest stable NGINX 1.4.x with websocket support
add-apt-repository -y ppa:nginx/stable

View File

@@ -1,3 +1,3 @@
#!/bin/bash
set -e
#!/usr/bin/env bash
set -eo pipefail
sudo /etc/init.d/nginx reload > /dev/null

View File

@@ -1,5 +1,5 @@
#!/bin/bash
set -e
#!/usr/bin/env bash
set -eo pipefail
APP="$1"; PORT="$2"
WILDCARD_SSL="$DOKKU_ROOT/ssl"
SSL="$DOKKU_ROOT/$APP/ssl"

View File

@@ -1,5 +1,5 @@
#!/bin/bash
set -e
#!/usr/bin/env bash
set -eo pipefail
KEYNAME="$1"
indent() { sed "s/^/ /"; }
echo "-----> Booting EC2 instance..."

View File

@@ -1,4 +1,5 @@
#!/bin/bash
#!/usr/bin/env bash
set -eo pipefail
SELF=`which $0`
VAGRANT_SSH_PORT=${VAGRANT_SSH_PORT:-"2222"}
PUBLIC_KEY=${PUBLIC_KEY:-"$HOME/.ssh/id_rsa.pub"}

View File

@@ -1,4 +1,5 @@
#!/bin/bash
#!/usr/bin/env bash
set -eo pipefail
sed --in-place "s|access_key|access_key = $AWS_ACCESS_KEY|" .s3cfg
sed --in-place "s|secret_key|secret_key = $AWS_SECRET_KEY|" .s3cfg
s3cmd -c .s3cfg get s3://progrium-private/ec2_cert.pem /tmp/cert

View File

@@ -1,5 +1,5 @@
#!/bin/bash
set -e
#!/usr/bin/env bash
set -eo pipefail
SELF=`which $0`; APP="$1"; TARGET="$2"; FORWARDED_PORT="$3"
TMP=$(mktemp -d -t "$TARGET.XXXXX")
trap "rm -rf $TMP" EXIT