Merge branch 'feature/ace' into 'main'
Feature/ace See merge request ujamii_dev/auto-dev-reverse-proxy!2
This commit is contained in:
commit
d3399944b1
1 changed files with 9 additions and 2 deletions
11
script/myssh
11
script/myssh
|
@ -13,6 +13,12 @@ SUBCOMMANDS:\n
|
||||||
SYNTAX connect host [-u user] [-p password] [-c client]
|
SYNTAX connect host [-u user] [-p password] [-c client]
|
||||||
"
|
"
|
||||||
|
|
||||||
|
# Detect Pipe
|
||||||
|
if ! [ -t 1 ]
|
||||||
|
then
|
||||||
|
USE_CLI=true
|
||||||
|
fi
|
||||||
|
|
||||||
get_template_string() {
|
get_template_string() {
|
||||||
if [ -z "$SQL_CLI_TEMPLATE" ]
|
if [ -z "$SQL_CLI_TEMPLATE" ]
|
||||||
then
|
then
|
||||||
|
@ -138,9 +144,9 @@ set_host_env() {
|
||||||
run_client() {
|
run_client() {
|
||||||
if [ "$1" = 'mysql' ]
|
if [ "$1" = 'mysql' ]
|
||||||
then
|
then
|
||||||
if which ace >/dev/null 2>&1
|
if [ -d "/Applications/Sequel Ace.app" ] && [ "${USE_CLI}" != true ]
|
||||||
then
|
then
|
||||||
ace
|
open "mysql://$2:$3@${SQL_PROXY_HOST}:6033" -a "Sequel Ace"
|
||||||
elif which mysql >/dev/null 2>&1
|
elif which mysql >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
mysql --protocol=TCP -u "$2" -p"$3" -h "${SQL_PROXY_HOST}" -P 6033
|
mysql --protocol=TCP -u "$2" -p"$3" -h "${SQL_PROXY_HOST}" -P 6033
|
||||||
|
@ -191,6 +197,7 @@ case "${MAIN_OPTION}" in
|
||||||
case "$o" in
|
case "$o" in
|
||||||
u) TARGET_HOST_USERNAME="$OPTARG" ;;
|
u) TARGET_HOST_USERNAME="$OPTARG" ;;
|
||||||
p) TARGET_HOST_PASSWORD="$OPTARG" ;;
|
p) TARGET_HOST_PASSWORD="$OPTARG" ;;
|
||||||
|
c) USE_CLI=true ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
get_host "${TARGET_HOST}"
|
get_host "${TARGET_HOST}"
|
||||||
|
|
Loading…
Reference in a new issue