first stab at a common functions library. include argument parsing and a few definitions wired up. closes #932. closes #945

This commit is contained in:
Michael Hobbs
2015-02-05 11:32:46 -08:00
parent 72a58bbda3
commit 6ad65dd9b4
13 changed files with 140 additions and 62 deletions

View File

@@ -35,11 +35,12 @@ The below plugin is a dummy `dokku hello` plugin. If your plugin exposes command
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$(dirname $0)/../common/functions"
case "$1" in
hello)
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
[[ ! -d "$DOKKU_ROOT/$2" ]] && echo "App $2 does not exist" && exit 1
verify_app_name "$2"
APP="$2";
echo "Hello $APP"