Project

General

Profile

1 8654 aaronmk
#!/bin/bash -e
2
# syncs VegCore.ERD.mwb's zip file contents
3 8774 aaronmk
. "$(dirname "${BASH_SOURCE[0]}")"/../../lib/runscripts/util.run
4 8927 aaronmk
. "$(dirname "${BASH_SOURCE[0]}")"/../../lib/local.sh
5 8654 aaronmk
6 8705 aaronmk
if self_not_included; then
7
8 8926 aaronmk
VegCore.my.sql/make ()
9
{
10
	echo_func; set_make_vars
11 8941 aaronmk
	database=VegCore mysqldump_local --skip-add-drop-table >"$target"
12 8926 aaronmk
}
13
14
export_mysql ()
15
{
16
	echo_func
17
	VegCore.my.sql/make
18
}
19
20 8931 aaronmk
VegCore.pg.sql/make ()
21
{
22
	echo_func; set_make_vars
23
	my2pg <"${target%.pg.sql}.my.sql" >"$target"
24
}
25
26
export_postgres ()
27
{
28
	echo_func
29
	VegCore.pg.sql/make
30
}
31
32 8654 aaronmk
export_ ()
33
{
34 8881 aaronmk
	echo_func
35 8935 aaronmk
	(cd "$top_dir"; unzip_newer "$top_filename" document.mwb.xml)
36 8926 aaronmk
	export_mysql
37 8931 aaronmk
	export_postgres
38 8654 aaronmk
}
39
40
import ()
41
{
42 8881 aaronmk
	echo_func
43 8935 aaronmk
	(cd "$top_dir"; zip_newer "$top_filename" document.mwb.xml)
44 8654 aaronmk
}
45
46
sync ()
47
{
48 8881 aaronmk
	echo_func
49 8936 aaronmk
	export_
50
	import
51 8654 aaronmk
}
52
53
all ()
54
{
55 8881 aaronmk
	echo_func
56 8654 aaronmk
	sync
57
}
58 8705 aaronmk
59
fi