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 8654 aaronmk
5 8705 aaronmk
if self_not_included; then
6
7 8654 aaronmk
export archive="${BASH_SOURCE[0]%.run}"
8
9
export archive_filename="$(basename "$archive")"
10
11 8926 aaronmk
VegCore.my.sql/make ()
12
{
13
	echo_func; set_make_vars
14
	database=VegCore mysqldump_local >"$target"
15
}
16
17
export_mysql ()
18
{
19
	echo_func
20
	VegCore.my.sql/make
21
}
22
23 8654 aaronmk
export_ ()
24
{
25 8881 aaronmk
	echo_func
26 8655 aaronmk
	(cd "$top_dir"
27 8660 aaronmk
	unzip_newer "$archive_filename" document.mwb.xml)
28 8926 aaronmk
	export_mysql
29 8654 aaronmk
}
30
31
import ()
32
{
33 8881 aaronmk
	echo_func
34 8655 aaronmk
	(cd "$top_dir"
35 8660 aaronmk
	zip_newer "$archive_filename" document.mwb.xml)
36 8654 aaronmk
}
37
38
sync ()
39
{
40 8881 aaronmk
	echo_func
41 8654 aaronmk
	export_ "$@"
42
	import "$@"
43
}
44
45
all ()
46
{
47 8881 aaronmk
	echo_func
48 8654 aaronmk
	sync
49
}
50 8705 aaronmk
51
fi