Use config_export function instead of calling dokku as a subcommand

This commit is contained in:
Jose Diaz-Gonzalez
2015-08-30 01:55:14 -04:00
parent cddc4afcea
commit e7c035e207
8 changed files with 40 additions and 21 deletions

View File

@@ -89,9 +89,9 @@ case "$1" in
config)
parse_config_args "$@"
config_create
is_config_export "$@" && config_export "$DOKKU_CONFIG_TYPE" "$APP" && exit 0
[[ "$APP" ]] && DOKKU_CONFIG_TYPE=$APP
[[ ! -s $ENV_FILE ]] && is_config_export "$@" && exit 0
[[ ! -s $ENV_FILE ]] && echo "no config vars for $DOKKU_CONFIG_TYPE" && exit 1
VARS=$(grep -Eo "export ([a-zA-Z_][a-zA-Z0-9_]*=.*)" $ENV_FILE | cut -d" " -f2-)
@@ -101,10 +101,6 @@ case "$1" in
echo $VARS
exit 0
fi
if [[ "$var" == "--export" ]]; then
echo "$VARS" | awk '{print "export " $0}'
exit 0
fi
done