Project

General

Profile

1 9590 aaronmk
#!/bin/bash -e
2 10759 aaronmk
. "$(dirname "${BASH_SOURCE[0]}")"/in_datasrc_dir.run
3 10760 aaronmk
.rel import.run
4 9590 aaronmk
5
if self_not_included; then
6
7 10945 aaronmk
table_subdirs=($(cat "$top_dir"/import_order.txt))
8
subdirs=("${table_subdirs[@]}")
9 9962 aaronmk
10 10946 aaronmk
postprocess()
11
{
12
	echo_func
13
	local subdirs=("${table_subdirs[@]}")
14
	fwd "$FUNCNAME" "$@"
15
}
16
17 9962 aaronmk
import()
18
{
19 11170 aaronmk
	echo_func; set_make_vars
20 11872 aaronmk
	if remaking; then datasrc_make uninstall; fi
21 11875 aaronmk
	if ! pg_schema_exists; then # uses $schema
22
		datasrc_make schema
23
		datasrc_make sql/install </dev/null
24
			# </dev/null because for datasources w/o SQL files, cat will try to
25
			# read from stdin
26
	fi
27 9962 aaronmk
	fwd "$FUNCNAME" "$@"
28
}
29
30 9590 aaronmk
fi