From 1eb01db8f9a3c8e2a2745b162679ae5fb76c946d Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 14 Jan 2015 04:27:06 -0500 Subject: [PATCH] Add ability to alias `dokku_client.sh` as `dokku` command locally --- contrib/dokku_client.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/contrib/dokku_client.sh b/contrib/dokku_client.sh index 1a268aa96..6e55414cd 100755 --- a/contrib/dokku_client.sh +++ b/contrib/dokku_client.sh @@ -2,7 +2,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x if [[ ! -z $DOKKU_HOST ]]; then - function dokku { + function _dokku { appname="" if [ -d .git ] || git rev-parse --git-dir > /dev/null 2>&1; then set +e @@ -40,4 +40,9 @@ if [[ ! -z $DOKKU_HOST ]]; then shift ssh dokku@$DOKKU_HOST "$verb" "$appname" $@ } + + if [[ "$0" == "dokku" ]] || [[ "$0" == *dokku_client.sh ]]; then + _dokku $@ + exit $? + fi fi