mirror of
https://github.com/penpot/penpot.git
synced 2026-07-21 13:37:49 +00:00
35 lines
703 B
Bash
Executable File
35 lines
703 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
HOST="${PENPOT_DB_HOST:-postgres}"
|
|
USER="${PENPOT_DB_USER:-penpot}"
|
|
PASSWORD="${PENPOT_DB_PASSWORD:-penpot}"
|
|
DB="${PENPOT_DB_NAME:-penpot}"
|
|
|
|
while [[ $# -gt 0 ]]; do
|
|
case "$1" in
|
|
--test)
|
|
DB="penpot_test"
|
|
shift
|
|
;;
|
|
--host|-h)
|
|
HOST="$2"
|
|
shift 2
|
|
;;
|
|
--user|-U)
|
|
USER="$2"
|
|
shift 2
|
|
;;
|
|
--db|-d)
|
|
DB="$2"
|
|
shift 2
|
|
;;
|
|
*)
|
|
break
|
|
;;
|
|
esac
|
|
done
|
|
|
|
export PGPASSWORD="$PASSWORD"
|
|
exec pg_dump -h "$HOST" -U "$USER" -d "$DB" --schema-only --no-owner --no-privileges "$@"
|