Skip to content

Commit e746355

Browse files
committed
added options to trigger mysql, postgre or mariadb
1 parent 7a7d9d9 commit e746355

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

tableplus/tableplus

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Opens TablePlus
44
##
5-
## Usage: fin tableplus
5+
## Usage: fin tableplus [mysql|mariadb|postgre]
66

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

1717
PORT=${PORT:-$container_port}
1818

19-
open "mariadb://${USER}:${PASS}@${HOST}:${PORT}/${DB}?statusColor=007F3D&enviroment=local&name=${NAME}"
19+
20+
21+
case "$1" in
22+
mysql)
23+
open "mysql://${USER}:${PASS}@${HOST}:${PORT}/${DB}?statusColor=007F3D&enviroment=local&name=${NAME}"
24+
;;
25+
mariadb)
26+
open "mariadb://${USER}:${PASS}@${HOST}:${PORT}/${DB}?statusColor=007F3D&enviroment=local&name=${NAME}"
27+
;;
28+
postgre)
29+
open "postgresql://${USER}:${PASS}@${HOST}:${PORT}/${DB}?statusColor=007F3D&enviroment=local&name=${NAME}"
30+
;;
31+
*)
32+
echo "Usage: fin tableplus [mysql|mariadb|postgre]"
33+
exit 1
34+
;;
35+
esac

0 commit comments

Comments
 (0)