Move client into sbin dir

This commit is contained in:
Luke Murphy 2020-03-17 02:09:13 +01:00
parent 4b64c55db6
commit 007b1a1f6d
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

View File

@ -1,9 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -eo pipefail set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x [[ $DOKKU_TRACE ]] && set -x
export DOKKU_PORT=${DOKKU_PORT:=22} export DOKKU_PORT=${DOKKU_PORT:=22}
export DOKKU_HOST=${DOKKU_HOST:=} export DOKKU_HOST=${DOKKU_HOST:=}
@ -147,9 +144,12 @@ main() {
[[ "$CMD" =~ events*|plugin*|ssh-keys* ]] && unset APP [[ "$CMD" =~ events*|plugin*|ssh-keys* ]] && unset APP
[[ -n "$APP_ARG" ]] && [[ "$APP_ARG" == "--global" ]] && unset APP [[ -n "$APP_ARG" ]] && [[ "$APP_ARG" == "--global" ]] && unset APP
[[ -n "$@" ]] && [[ -n "$APP" ]] && app_arg="--app $APP" [[ -n "$@" ]] && [[ -n "$APP" ]] && app_arg="--app $APP"
# echo "ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_REMOTE_HOST -- $app_arg $@"
# shellcheck disable=SC2068,SC2086 # shellcheck disable=SC2068,SC2086
ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_REMOTE_HOST -- $app_arg $@ ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_REMOTE_HOST -- $app_arg $@
} }
main "$@" if [[ "$0" == "dokku" ]] || [[ "$0" == *dokku_client.sh ]] || [[ "$0" == $(which dokku) ]]; then
exit $? main "$@"
exit $?
fi