aboutsummaryrefslogtreecommitdiff
path: root/templates/.bin/psqlenv
blob: 61fd8433210b8be464409027f2faa1b06739b917 (plain)
1
2
3
4
5
6
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'`