diff options
author | Ben Burwell <ben@benburwell.com> | 2019-08-13 14:40:54 -0400 |
---|---|---|
committer | Ben Burwell <ben@benburwell.com> | 2019-08-13 14:40:54 -0400 |
commit | c09d91fe95fca4367f47c06fc808cd02a1a8e6a5 (patch) | |
tree | 6c5c8dee0c219ab701dc1ff4c39e905dbac08e70 /templates/.bin/psqlenv |
add bins
Diffstat (limited to 'templates/.bin/psqlenv')
-rwxr-xr-x | templates/.bin/psqlenv | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/templates/.bin/psqlenv b/templates/.bin/psqlenv new file mode 100755 index 0000000..61fd843 --- /dev/null +++ b/templates/.bin/psqlenv @@ -0,0 +1,7 @@ +#!/bin/sh + +dbname="DATABASE_URL" +if [ $# -ne 0 ]; then + dbname=$1 +fi +psql `grep "^$dbname=" -m 1 < .env | cut -d'=' -f2 | sed 's/"//g'` |