Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI01-discovery/branches/ingestAutomation-upgrade/database/create_database.sh@3968
Revision 3968,
762 bytes
checked in by cbyrom, 13 years ago
(diff) |
Add test data to create_database.sh script.
|
-
Property svn:executable set to
*
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | |
---|
3 | if [ $# -lt 2 ] |
---|
4 | then |
---|
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 |
---|
9 | fi |
---|
10 | |
---|
11 | port="5432" |
---|
12 | if [ $# -gt 3 ] |
---|
13 | then |
---|
14 | port=$4 |
---|
15 | fi |
---|
16 | |
---|
17 | host="localhost" |
---|
18 | if [ $# -gt 2 ] |
---|
19 | then |
---|
20 | host=$3 |
---|
21 | fi |
---|
22 | |
---|
23 | dbOptions="-U $1 -d $2 -h $host -p $port" |
---|
24 | echo $dbOptions |
---|
25 | |
---|
26 | psql -f ingest_procedures.sql $dbOptions |
---|
27 | psql -f original_document.sql $dbOptions |
---|
28 | psql -f transformed_document.sql $dbOptions |
---|
29 | psql -f spatial_data.sql $dbOptions |
---|
30 | psql -f temporal_data.sql $dbOptions |
---|
31 | psql -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.