这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions contrib/dokku_client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ random_name() {
UPPER_APPNAME="${MOVES[${NUM1}]}-${MOVES[${NUM2}]}-${NAMES[${NUM3}]}"

[[ "$BASH_VERSION" =~ 4.* ]] && lower_appname=${UPPER_APPNAME,,}
[[ -z "$lower_appname" ]] && lower_appname=$(echo $UPPER_APPNAME | tr '[:upper:]' '[:lower:]')
[[ -z "$lower_appname" ]] && lower_appname=$(echo "$UPPER_APPNAME" | tr '[:upper:]' '[:lower:]')
echo "$lower_appname"
}

Expand Down Expand Up @@ -81,8 +81,7 @@ if [[ ! -z $DOKKU_HOST ]]; then
counter=$((counter+1))
fi
done
if git remote add dokku "dokku@$DOKKU_HOST:$appname"
then
if git remote add dokku "dokku@$DOKKU_HOST:$appname"; then
echo "-----> Dokku remote added at $DOKKU_HOST"
echo "-----> Application name is $appname"
else
Expand All @@ -94,7 +93,7 @@ if [[ ! -z $DOKKU_HOST ]]; then
fi

if [[ -z "$donotshift" ]]; then
ssh -t "dokku@$DOKKU_HOST" "$@"
ssh -o LogLevel=QUIET -t "dokku@$DOKKU_HOST" "$@"
exit $?
fi

Expand All @@ -121,7 +120,7 @@ if [[ ! -z $DOKKU_HOST ]]; then
fi
fi
# shellcheck disable=SC2086
ssh -t "dokku@$DOKKU_HOST" $long_args "$verb" "$appname" "${args[@]}"
ssh -o LogLevel=QUIET -t "dokku@$DOKKU_HOST" $long_args "$verb" "$appname" "${args[@]}"
}

if [[ "$0" == "dokku" ]] || [[ "$0" == *dokku_client.sh ]] || [[ "$0" == $(which dokku) ]]; then
Expand Down