Skip to content

Commit

Permalink
added options to trigger mysql, postgre or mariadb
Browse files Browse the repository at this point in the history
  • Loading branch information
craigAtCD committed Jan 19, 2020
1 parent 7a7d9d9 commit e746355
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions tableplus/tableplus
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Opens TablePlus
##
## Usage: fin tableplus
## Usage: fin tableplus [mysql|mariadb|postgre]

# Abort if anything fails
set -e
Expand All @@ -16,4 +16,20 @@ NAME=${COMPOSE_PROJECT_NAME}

PORT=${PORT:-$container_port}

open "mariadb://${USER}:${PASS}@${HOST}:${PORT}/${DB}?statusColor=007F3D&enviroment=local&name=${NAME}"


case "$1" in
mysql)
open "mysql://${USER}:${PASS}@${HOST}:${PORT}/${DB}?statusColor=007F3D&enviroment=local&name=${NAME}"
;;
mariadb)
open "mariadb://${USER}:${PASS}@${HOST}:${PORT}/${DB}?statusColor=007F3D&enviroment=local&name=${NAME}"
;;
postgre)
open "postgresql://${USER}:${PASS}@${HOST}:${PORT}/${DB}?statusColor=007F3D&enviroment=local&name=${NAME}"
;;
*)
echo "Usage: fin tableplus [mysql|mariadb|postgre]"
exit 1
;;
esac

0 comments on commit e746355

Please sign in to comment.