source: TI01-discovery/branches/ingestAutomation-upgrade/database/create_database.sh @ 3968

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI01-discovery/branches/ingestAutomation-upgrade/database/create_database.sh@6200
Revision 3968, 762 bytes checked in by cbyrom, 12 years ago (diff)

Add test data to create_database.sh script.

  • Property svn:executable set to *
Line 
1#!/bin/bash
2
3if [ $# -lt 2 ]
4then
5         echo 1>&2 Usage: $0 username database [hostname] [port]
6         echo 1>&2 - hostname defaults to 'localhost'
7         echo 1>&2 - port defaults to 5432
8         exit 127
9fi
10
11port="5432"
12if [ $# -gt 3 ]
13then
14        port=$4
15fi
16
17host="localhost"
18if [ $# -gt 2 ]
19then
20        host=$3
21fi
22
23dbOptions="-U $1 -d $2 -h $host -p $port"
24echo $dbOptions
25
26psql -f ingest_procedures.sql $dbOptions
27psql -f original_document.sql $dbOptions
28psql -f transformed_document.sql $dbOptions
29psql -f spatial_data.sql $dbOptions
30psql -f temporal_data.sql $dbOptions
31psql -f spatial_temporal_data.sql $dbOptions
32# - the following loads some test data into the system - useful for testing in absence of ingestible datasets
33#psql -f test_data.sql $dbOptions
Note: See TracBrowser for help on using the repository browser.