mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-02-21 04:43:35 +00:00
25 lines
494 B
Bash
Executable File
25 lines
494 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Build the RSCDS database
|
|
#
|
|
|
|
DBNAME="${1:-rscds}"
|
|
|
|
DBADIR="`dirname \"$0\"`"
|
|
|
|
# FIXME: Need to check that the database was actually created.
|
|
createdb -E UTF8 "${DBNAME}"
|
|
|
|
#
|
|
# This will fail if the language already exists.
|
|
# FIXME: test for the language first, perhaps.
|
|
createlang plpgsql "${DBNAME}"
|
|
|
|
#
|
|
# FIXME: filter non-error output
|
|
psql -f "${DBADIR}/rscds.sql" "${DBNAME}"
|
|
|
|
psql -f "${DBADIR}/caldav_functions.sql" "${DBNAME}"
|
|
|
|
psql -f "${DBADIR}/sample-data.sql" "${DBNAME}"
|